Maven experts: How to deploy artifact to Maven central

241 views
Skip to first unread message

Tim Fox

unread,
May 21, 2013, 11:54:55 AM5/21/13
to ve...@googlegroups.com
I'm trying and failing to deploy the maven archetype artifact to Maven Central.

Project is here:


I'm executing

mvn clean deploy -Dgpg.passphrase=MYPASSWORD

I have valid gpg keys in my .gnupg directory

(The same keys work fine when uploading via Gradle).

When the artifacts are uploaded they are no .asc files so the artifacts fail validation for moving to Maven Central.

Any ideas?


Mikael Karon

unread,
May 21, 2013, 12:15:42 PM5/21/13
to ve...@googlegroups.com, Adrian Gonzalez
Adrian _just_ did this for our vertx mods. I've done this myself, but only via mvn gpg:sign-and-deploy-file (http://maven.apache.org/plugins/maven-gpg-plugin/sign-and-deploy-file-mojo.html).

Worst case I think you can upload the asc files manually via the web-ui before closing the staging repo. 

@Adrian, mind replying and lending a helping hand?
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Adrian Gonzalez

unread,
May 21, 2013, 3:11:29 PM5/21/13
to ve...@googlegroups.com
I already had the artifacts I wanted to upload so I followed section 7b using an upload bundle: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7b.StageExistingArtifacts

1. Create the gpg .asc signature file for each artifact to upload:
$ gpg -ab MyArtifact-1.0.0-beta1.pom

2. Generate a bundle jar file to upload
$ jar -cvf bundle.jar *
(Or list each file individually, don't forget the .asc files)

3. Log in to oss.sonatype.org and go to Staging Upload under Build Promotion on the left.  Select Artifact Bundle from the drop down and select the bundle you just created and upload.

4. If all goes well, you should see a new repository listed under Staging Repositories.  The activity tab should show the rules that were run through and any errors.  If there were no errors the repository should have auto closed.  You can then select it and choose release.  It takes a couple hours for the artifacts to be pulled into Maven Central, but they should be visible in https://oss.sonatype.org/content/repositories/releases/ immediately.

Not a long term automated solution, but it worked for me today.

Hope this helps,
-a

Tim Fox

unread,
May 22, 2013, 12:40:18 PM5/22/13
to ve...@googlegroups.com
Thanks Adrian but I was hoping to avoid the manual method :(
Reply all
Reply to author
Forward
0 new messages