/ jetty

Fun with sbt and orbit packaging.

Hopefully this quick blog post can save someone else a lot of frustration I just experienced.  I’m currently in the process of upgrading my servers to sbt 0.13 in preparation for a release of Anchor Tab that builds using that version.

Things were working fine on my local system, so I had no reason to believe things would break on the server. Until my Jenkins builds kept failing with the following error.

[warn] [NOT FOUND ] org.eclipse.jetty.orbit#javax.servlet;3.0.0.v201112011016!javax.servlet.orbit (104ms)

[warn] ==== public: tried

[warn] http://repo1.maven.org/maven2/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.orbit

[warn] ::::::::::::::::::::::::::::::::::::::::::::::


[warn] :: ^ see resolution messages for details ^ ::

[warn] ::::::::::::::::::::::::::::::::::::::::::::::

[warn] :: org.eclipse.jetty.orbit#javax.servlet;3.0.0.v201112011016!javax.servlet.orbit

[warn] ::::::::::::::::::::::::::::::::::::::::::::::

It took some digging through an old ticket on the sbt project, but sure enough the answer was there. To quote, harrah:

If sbt <0.12.2 was used to get this dependency, the bad metadata in the cache won’t be invalidated. Try removing ~/.ivy2/cache/org.eclipse.jetty.orbit and reresolving.

Sure enough, nuking that folder then running sbt again got things up and running without issue. Some bugs take way too long to sort out for their complexity. Here’s hoping some of the search engine juice on this blog saves the next guy some time.