The Pain is Over For Java.net's Maven Artifacts!

DZone 's Guide to

The Pain is Over For Java.net's Maven Artifacts!

· Java Zone ·
Free Resource

Deploying Maven artifacts using the java.net repository is always a challenge and most of the time the result is unpredictable...the good news is Sonatype's is opening it's Nexus OSS instance for all of the java.net project!

All the projects I'm involved that needs to deploy on java.net maven repository are daily failling (many many times) with the not so nice exception:


[HUDSON] Archiving http://hudson.sfbay/job/Atmosphere/org.atmosphere.samples$atmosphere-simple-jersey/ws/target/atmosphere-simple-jersey-sources.jar to /files/hudson/server/jobs/Atmosphere/modules/org.atmosphere.samples$atmosphere-simple-jersey/builds/2010-02-24_18-18-14/archive/org.atmosphere.samples/atmosphere-simple-jersey/0.6-SNAPSHOT/atmosphere-simple-jersey-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Error installing artifact's metadata: Error while deploying metadata: Connection failed: Unable to connect to https://svn.dev.java.net/svn/maven2-repository/trunk/repository/

svn: The specified baseline is not the latest baseline, so it may not be checked out.
svn: CHECKOUT of svn/maven2-repository/!svn/bln/2053093': 409 Conflict (https://svn.dev.java.net)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22 minutes 9 seconds
[INFO] Finished at: Wed Feb 24 18:40:27 PST 2010
[INFO] Final Memory: 78M/168M
[INFO] ------------------------------------------------------------------------
Waiting for Hudson to finish collecting data\

This happens for project like Grizzly, Atmosphere and Jersey, making the deployment of SNAPSHOT and official release quite complicated. Project like GlassFish started using their own repository to workaround that issue. When I was at Sun we worked on tricks like committing the artifact manually using SSH (wow!), or use scripts that try over an over until it succeed (wow!). With Grizzly, it took sometimes 3 DAYS to deploy the official release. So I guess we can say the java.net repositoty is a little broken :-).

Now will it get fixed when java.net/kenai merge? We have to see...but Kenai doesn't have a Maven repository so I suspect the same one will be used, hence all the pain! But there is a good news! Sonatype is opening it's Nexus OSS instance to all java.net project (actually not only java.net...any OSS projects). You can read the official announcement here....the java.net migration day is targetted March 5! If you use Maven and deploy on java.net, I think that's a good opportunity to save pain and improve your release cycle!

From http://weblogs.java.net/blog/jfarcand


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}