Thursday, December 20, 2007

Aren't Packaging Systems Supposed to Make Life Easier?

So, I'd like to conduct a little experiment with CXF. Specifically, the version of CXF that the current version of ServiceMix uses.

ServiceMix uses a complex multiproject Maven build, which is pretty normal these days. Due to the parenting structure, it took me a little while just to figure out which version of CXF ServiceMix uses. I eventually found it simpler to download the source and run a grep. It uses 2.0.2-incubator.

Equipped with this knowledge, I added the version to my own Maven POM for the project, only to discover that CXF 2.0.2-incubator uses jaxb-impl 2.0.5, which isn't in the central Maven repo. A little digging with Nabble shows me that it's in the repo, but that the repo uses the Maven 1 repository structure.

I did a quick dig on the repo to ensure that there isn't a Maven 2 structure as well. It seems like there is, but that jaxb-impl doesn't publish new versions there (although there seems to be an old version there, for whatever reason).

Because it's not always possible to find a Maven repository that holds the dependency you need, and because they're not always reliable, we're using Artifactory as a mirror/proxy for Maven repositories. This means that in order to take on the repo, we need to add the repo to Artifactory rather than to the project POM.

Unfortunately, it turns out that Artifactory, unlike the Maven POM, doesn't support a configuration option for legacy maven repositories. So now I have to download the dependency and upload it to artifactory.

So, due to lots of leaking abstractions, i've now spent about two hours setting up something that, five years ago, would ahve taken ten minutes - download ServiceMix, grab its CXF jar, drop it in a lib directory, and reference it from Ant.

Three cheers for packaging systems. maven/artifactory and leaking abstractions.


Jason said...

you could spend that 10 minutes it would have taken the file and referenced it in ant and simply installed it into your local maven repo with mvn install:file

Geoffrey Wiseman said...

I could have - that wouldn't help anyone else who needed to try the project.