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

时间:2015-05-15 22:32:29

标签: 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

要求去上述地点,但那里没有太多信息。可以帮助我解决这个问题。

感谢。

1 个答案:

答案 0 :(得分:8)

您似乎遇到与this question相同的问题。

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

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