Skip to main content

The pain is over for java.net's Maven artifacts!

Posted by jfarcand on February 25, 2010 at 7:00 AM PST

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!

IMG_0395.jpg

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  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] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[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!

 

Related Topics >>

Comments

I absolutely agree! In fact,

I absolutely agree! In fact, I've just moved most of my stuff to Sonatype (and the remainder will be moved soon). As a plus, since artifacts are hosted on a Nexus instance that provides an .index file, it can be configured in the NetBeans IDE so one can explore the contents of the repo (and I suppose this also improve autocompletion of POMs and the embedded search for artifacts).