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

use*_*282 1 java eclipse apache maven

我是J2EE开发的新手.我正在关注教程共享@ http://www.tutorialspoint.com/jsf/jsf_first_application.htm

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

mvn archetype:create -DgroupId = com.tutorialspoint.test -DartifactId = helloworld -DarchetypeArtifactId = maven-archetype-webapp

我收到以下错误:

[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
Run Code Online (Sandbox Code Playgroud)

它要求去上面的位置,但那里没有太多的信息.可以帮助我解决这个问题.

谢谢.

yan*_*976 8

您似乎遇到此问题相同的问题.

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

mvn archetype:generate -DgroupId=com.tutorialspoint.test -DartifactId=helloworld -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
Run Code Online (Sandbox Code Playgroud)