Showing posts with label Archetype Catalog. Show all posts
Showing posts with label Archetype Catalog. Show all posts

Friday, December 12, 2008

Bookmark and Share
For a recent project, a colleague of mine and I created a Maven archetype, allowing for a very simple creation of web service projects (more to follow in a future post). Everything worked out fine on our boxes, but another colleague we asked for testing the archetype, reported, that he had some trouble using it.

After some investigations, we found out, that there is an issue with the Maven archetype plugin, which ignores your proxy settings, if you specify an archetype catalog (This JIRA-Issue seems to describe that problem). So, if you are sitting behind a web proxy, e.g. the command
$ mvn archetype:generate -DarchetypeCatalog=http://maven-instant-ws.googlecode.com/svn/repo/archetype-catalog.xml
might lead to the following error after some time:
[WARNING] Error reading archetype catalog http://maven-instant-ws.googlecode.com/svn/repo/archetype-catalog.xml
For me, it helped to remove the archetype plugin from my local Maven repository by deleting the folder /home/<username>/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin before issuing the command above.

This forces Maven to download the archetype plugin again, for some reason causing it to find the archetype catalog properly. If I try to create another project from using the catalog – having the archetype plugin in my local repo now – the same error as before occurs.