Tuesday, April 7, 2009

Accessing archetype while using nexus repository manager as proxy

I was trying to use Eclipse with m2eclipse for creating some FUSE ESB project from the archetypes and was getting strange error :

"Unable to create project from archetype [org.apache.servicemix.tooling:servicemix-bean-service-unit:3.3.1.16-fuse -> null]
> The desired archetype does not exist (org.apache.servicemix.tooling:servicemix-bean-service-unit:3.3.1.16-fuse)"


After drilling down more and looking into it I found the problem was :
1. I did configured the nexus index catalog http://repo.open.iona.com/maven2/archetype-catalog.xml correctly.
2. However, I later realized that I am using Nexus repository manager which doesn't automatically download the catalog itself and so it is not getting all the requited information to download the correct artifacts.

The way I fixed this for now is manually downloading the archetype-catalog.xml via my Nexus repository instance like this:

wget http://my-nexus-proxy:8081/nexus/content/repositories/open.iona.m2/archetype-catalog.xml

once the catalog was available locally at my nexus repository I then used the Eclipse m2eclipse plugin in usual manner and it went and download required archetype plugins from the remote repository into my nexus instance.

I really would like to see some option in Nexus which would allow synchronization of such artifacts which are not downloaded normally by maven dependency. Some way of scheduling such stuff (I know we can schedule the task but some smart scheduling for such category of artifacts).

For now manual downloading and sync is the way to get around the problem.

No comments: