无法使用maven- prototype -webapp插件创建基于maven的应用程序



我是J2EE开发的新手。我遵循教程分享@ http://www.tutorialspoint.com/jsf/jsf_first_application.htm

创建基于maven的应用程序。问题是当我运行第一个命令

mvn原型:create -DgroupId=com. tutorialpoint。test -DartifactId=helloworld -DarchetypeArtifactId=maven- prototype -webapp

I am getting below error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.3:create (default-cli) on project standalone-pom: Unable to parse configuration
 of mojo org.apache.maven.plugins:maven-archetype-plugin:2.3:create for paramete
r #: Cannot create instance of interface org.apache.maven.artifact.repository.Ar
tifactRepository: org.apache.maven.artifact.repository.ArtifactRepository.<init>
() -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginConfigurationException

它要求去上面的位置,但那里没有太多的信息可用。你能帮我一下吗?

谢谢。

你似乎和这个问题有同样的问题。

答案似乎是你应该使用generate而不是create:

mvn archetype:generate -DgroupId=com.tutorialspoint.test -DartifactId=helloworld -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

最新更新