Friday, March 14, 2008

My experiments of setting up Apache Archiva and proximity

From last 3 - 4 days I was playing with Apache Archiva 1.0.1, Proximity and artifactory.

One thing I found in common is the trouble to get it setup and lack of basic documentation or sample configuration.
After playing so long and spending long nights breaking my head over it finally mange to get Apache Archiva configured for my maven based projects.Initially I got proximity setup successful for Apache CXF build but couldn't get it to work with ServiceMix builds so started looking at artifactory. It was sure easy enough to get started with artifactory but soon I hit a problem where it won't like my repository mirror names and started rejecting them with cookie problems saying host-domain cannot contain "." character.

Finally got Archiva working with our inhouse Maven mirrors and external repositories.

I had to play around a lot and do the following things to let the Archiva talk to external mirrors.
1. I had to add repository proxy connectors for each of them.(which was expected)
2. Change managed repository to internal (snapshots which is shown in default selection didn't work for me.
3. Had to add */** pattern for WhiteList in proxy connector.
4. Biggest of all and most annoying part (since it took long time to find out) was to mark the java-net repository as maven 1.x repository because it has propitiatory directory structure which doesn't follow maven2 style.

After all this (looks to small to write but took 3-4 days to experiment in spare time) finally got Archiva to work.

Now next exercise is to clean local maven repository and run the builds. Also, would be interesting is to point repositories to nfs share if possible to speed up caching.

I guess whatever I wrote is not too useful so I might do another post with sample proximity configuration with public repositories.
The whole reason for this blogging exercise was to record it somewhere for later reference as I struggled to find the example configurations.

No comments: