问题
I'm following this guide:
http://www.stripesframework.org/pages/viewpage.action?pageId=1572995&decorator=printable
I run the following command, which reports BUILD SUCCESS:
mvn install:install-file -Dfile=stripes-archetype-quickstart-1.0.jar -DgroupId=net.sourceforge -DartifactId=stripes-archetype-quickstart -Dversion=1.0 -Dpackaging=jar
I had previously downloaded the file "stripes-archetype-quickstart-1.0.jar" from here :
http://sourceforge.net/projects/mvnstripes/files/stripes-quickstart-1.0/1.0/stripes-archetype-quickstart-1.0.jar/download
So far so good, now I continue with the guide and attempt to create a project based on the archetype with this command:
mvn archetype:generate -DarchetypeArtifactId=stripes-archetype-quickstart -DarchetypeGroupId=net.sourceforge -DarchetypeVersion=1.0
But Maven doesn't appear to recognize the newly installed archetype; and it goes into interactive mode:
Your filter doesn't match any archetype (hint: enter to return to initial list) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): :
Is there a trick I'm missing here ?
回答1:
You should use option "-DarchetypeCatalog=local" when referencing local archetype, e.g.
mvn archetype:generate -DarchetypeCatalog=local
回答2:
with -DinteractiveMode=false
will solve the issue
来源:https://stackoverflow.com/questions/14661483/maven-3-stripes-archetype-cannot-create-project