Wednesday, March 19, 2008

Something about the proximity problems I had.

It's been 4-5 days on and off I am trying the Maven Repository products to get working with Apache ServiceMix 3.2 build and test.

Goal: To get Apache ServiceMix 3.2 build and test working.

I think I should summarize the experience as I am pretty much giving up on them (or probably not but not sure yet). One thing is sure I liked the exercise even though frustrating some times.

1. Proximity :
* With no longer in development and Subversion repository, wiki, forums gone it is hard to get the bundle. I manage to get it from Bruce Snyder's Proximity blog entry.
* Hard to configure as no documentation around. (Thanks to Bruce Snyder for helping out)

Problems I faced are:
1. After adding the required bean entries and FSStores and Remote Peer locations It didn't work.
2. So tried sequencing the entries based on preference and updated for each beam entry accordingly.
3. After fixing this got the Repository logic properties wrong on some entires, fixed that and still proximity wouldn't try all the repositories listed.
4. After lot of time (without any docs) found that I was putting all the repository entries in separate group and as per my settings.xml maven was only requesting on public group so modified the configuration and updated for all required entries to public.
5. At this stage got maven to talk to the repositories and here I hit the big problem (may be a bug in proximity) for some of the dependencies which are available in more than one repositories it was corrupting the Jar files and POM files. This caused builds to fail on invalid POM and jar file. The POM file of the artifact in the local repository was replaced by some kind of Proximity generated artifact summary.

At this stage I gave up and moved on.

Nice to have: Some documentation around configuration, UI for adding or editing configuration. Hand editing the XML configuration is error-prone task.

Apache Archiva 1.0.1:
Similar to Proximity had some configuration issues. Didn't know need to add proxy connector for each repository entry. Once the repository entries, connectors and all entries in one group I was hit by a issue of cookies didn't like the url name of some of my entries saying they do not confirm to RFC2109. It didn't talk to that repository at all. Tried putting IP address but no luck archiva would resolve it and skip the repository with same error.
Result: Stopped experimenting.

One strong point is the ability to configure using UI in browser. It makes it much easier to view and edit configuration compared to other 2.

Nice to have: Little more speed in download artifacts. Found it slow even for cached artifacts. And also the fix/workaround (or visible documentation somewhere if it exists) for the RFC 2109 error.

Artifacotry 1.2.5 :
After playing with this I even if the build was not successful I started liking it for the speed of the downloads especially compared to Archiva. With some more efforts and configuration I got Artifactory to talk to all the repositories I wanted. It also gave the same RFC2109 error so changed to IP address and it still showed the error but was able to contact the repository alright.
Next issue was grouping and search order. From documentation page I manage to find out the search order and learned about the VirtualRepo. So Added new virtualRepo and added reference to my repository entries in the order I wanted.
So far so good stared downloading artifacts etc. but still my end goal was failure .

Even after so much trying out and tweaking the configuration the end result still was build failure, until while writing this blog entry I found the problem and after correcting it got it to work the way I wanted with successful build.

The final piece of the puzzle to get artifactory work the way I wanted was to add the exclusion for maven-plugins in apache.snapshots entry in configuration.

Lack of this exclusion was causing the build to pickup latest snapshot release and somewhere down the line the rest of the maven plugins picked up were either unstable or non-existent versions. I suspect this also would have been the problems with other 2 experiments also but anyway the other bug in Proximity still would mess -up the artifacts.

Next goal is to get the Apache CXF building with the same setup which I am 95% sure will work.

No comments: