Why does not archetype:generate with parameters work for me?

If you are using a Windows shell you need to put quotes around the arguments like this:

mvn archetype:generate "-DarchetypeGroupId=org.codehaus.mojo" "-DarchetypeArtifactId=gwt-maven-plugin" "-DarchetypeVersion=2.5.0"

Thanks to the poster here for pointing this out.


The = signs are missing on some parameters, try:

 mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.5.0

You may as well specify -DgroupId=<group-id> and -DartifactId=<artifact-id> so Maven won't ask.