Maven archetype-plugin

I wanted to try-out Maven 3 and Appfuse 2.1 today. Unfortunatly, I lost some time due to a problem with the Archetype-plugin, and me being behind proxy.

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-spring-archetype -DarchetypeVersion=2.1.0-M2-SNAPSHOT -DgroupId=be.fatsu -DartifactId=test1 -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse


as generated by the appfuse quickstart page fails with TransferFailedException: Error transferring file.

The Archetype plugin apparently doesn't take into account the proxy configuration from the maven settings, as explained in the related issue: ARCHETYPE-202.

The easiest way around this is by setting system variables:

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-spring-archetype -DarchetypeVersion=2.1.0-M2-SNAPSHOT -DgroupId=be.fatsu -DartifactId=test1 -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse -Dhttp.proxyHost=xxx.xxx.xxx.xxx -Dhttp.proxyPort=xxxx -Dhttp.proxyUser=xxxxxxx -Dhttp.proxyPassword=xxxxxxx