Maven 3: Stripes Archetype - cannot create project?

試著忘記壹切 提交于 2019-12-24 23:23:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!