Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ee4j-build] how to access staged artifacts?

On Tue, Oct 30, 2018 at 2:52 PM Bill Shannon <bill.shannon@xxxxxxxxxx> wrote:
Ok...  I'll eventually figure this out...

I see that a bunch of this configuration was added to the JavaMail pom.xml; now I'm starting to understand its purpose...  :-)

In the nexus-staging-maven-plugin doc, it has this configuration:
				<!-- The Base URL of Nexus instance where we want to stage -->
				<nexusUrl>http://localhost:8081/nexus/</nexusUrl>
				<!-- The server "id" element from settings to use authentication from -->
				<serverId>local-nexus</serverId>

Make sure you define extension=true inside the <plugin> element.
 
I assume serverId should be "ossrh" for us,
 
Yes. 

but what should we use for nexusUrl? "https://oss.sonatype.org/"?

That's the right URL.
 

Do we also need this:
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                           <skip>true</skip> <!-- To prefer nexus-staging-maven-plugin -->
                        </configuration>
                   </plugin>

I'd say this is optional, however it feels safer to force the maven-deploy-plugin to be skipped.

    

Romain Grécourt wrote on 10/30/2018 02:31 PM:
And that you provided -DstagingRepositoryId=jakartaactivation-1018

So I'm guessing that the property was not picked-up and that you close an empty staging repository.

Looking at the JAF pom here: https://github.com/eclipse-ee4j/jaf/blob/EE4J_8/pom.xml the nexus plugin is only defined in pluginManagement.
The documentation for the nexus-staging-plugin (https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin#maven3-only) states that the plugin must be defined as an extension.
The reason for that is that the plugin will replace the execution of maven-deploy-plugin.

This means you *should not* see the regular maven-deploy-plugin being executed.
Instead you should see the nexus-maven-plugin being invoked for each module, where it stages the files to deploy to a temporary directory. At the end of your build you should see the nexus plugin uploading all these staged artifacts to nexus at once.

The output looks like this:

[INFO]  * Remote staging into staging profile ID "xxxxx"
[INFO]  * Using non-managed staging repository with ID "orgacme-1042" (we are NOT managing it).
[INFO]  * Uploading locally staged artifacts to profile org.acme
[INFO]  * Upload of locally staged artifacts finished.
[INFO] Remote staged 1 repositories, finished with success.

On Tue, Oct 30, 2018 at 2:02 PM Bill Shannon <bill.shannon@xxxxxxxxxx> wrote:
Romain Grécourt wrote on 10/30/2018 12:51 PM:
> You can pull artifacts from closed staging repositories using the staging
> group: https://oss.sonatype.org/content/groups/staging/
> Note that the repository has to be closed (cf the other thread where we
> discussed that)

My job says:
[INFO] Uploading to ossrh:
https://oss.sonatype.org/service/local/staging/deploy/maven2/com/sun/activation/jakarta.activation/1.2.1/jakarta.activation-1.2.1.jar
but when I look here:
https://oss.sonatype.org/content/groups/staging/com/sun/activation/
I see that jakarta.activation hasn't been modified recently, but
javax.activation has been.  And I can't find the 1.2.1 artifact under here.
Am I looking in the wrong place?  Did I do something wrong?

I definitely closed the staging repository:

[INFO] --- nexus-staging-maven-plugin:1.6.8:rc-close (default-cli) @ all ---
[INFO]  + Using server credentials "ossrh" from Maven settings.
[INFO]  * Connected to Nexus at https://oss.sonatype.org:443/, is version
2.14.10-01 and edition "Professional"
[INFO] RC-Closing staging repository with IDs=[jakartaactivation-1018]

Waiting for operation to complete...
.......

[INFO] Closed

And yes, I definitely deployed to that repository:

+ mvn -B -Poss-release -Pdeploy-release
'-DstagingRepositoryId=jakartaactivation-1018' deploy


> If you want to pull the staged artifacts from a Maven project that inherits the
> ee4j parent pom, you can simply use the "staging" profile.
> I.e add "-Pstaging" to your maven command line.

Yup, but I just wanted to download it manually to run the TCK against it.

> You could also simply declare the staging group as a repository in your project,
> to avoid requiring a profile.

If that's better, shouldn't we put that in the parent pom instead of defining
the profile?


> On Tue, Oct 30, 2018 at 12:24 PM Bill Shannon <bill.shannon@xxxxxxxxxx
> <mailto:bill.shannon@xxxxxxxxxx>> wrote:
>
>     I believe I've successfully deployed final artifacts to a staging repository.
>     How do I find that staging repository so I can download the artifacts manually
>     for testing?  If I use the URL that the artifacts are published to, it says I
>     need to login to oss.sonatype.org <http://oss.sonatype.org>.  Is there no
>     public access to these staged
>     artifacts?
>
>     For example, it's uploaded to:
>     https://oss.sonatype.org/service/local/staging/deploy/maven2/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar
>
>     Since the TCK doesn't run in Eclipse Jenkins yet, I want to download the
>     artifact and run the TCK locally.
>
>     Also, I believe there's some way to set up Jenkins so that artifacts from
>     the last build are accessible at a fixed URL.  How do I do that?
>     _______________________________________________
>     ee4j-build mailing list
>     ee4j-build@xxxxxxxxxxx <mailto:ee4j-build@xxxxxxxxxxx>
>     To change your delivery options, retrieve your password, or unsubscribe from
>     this list, visit
>     https://www.eclipse.org/mailman/listinfo/ee4j-build
>
>
>
> _______________________________________________
> ee4j-build mailing list
> ee4j-build@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/ee4j-build
>


Back to the top