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

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

它要求去上面的位置,但那里没有太多可用的信息。你能帮我解决这个问题吗?

谢谢。

最佳答案

您似乎遇到了与 this question 中相同的问题.

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

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

关于java - 无法使用 maven-archetype-webapp 插件创建基于 maven 的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30269710/

相关文章:

java - 解析 Set<String> 并基于公共(public)分隔符创建新的 Set<String>

java - 如何为包的所有类中的所有方法替换 catch block 中的现有代码?

java - Intellij IDEA 中的 Tomcat 错误

java - 使用 commandId 检索 Activity 键绑定(bind)

apache - 使用 htaccess 屏蔽 301 重定向的 URL

apache - 获取 apache 日志作为 csv 文件

java - Java/JPA 中类似 Django 的查询

java - 如何使用重定向在 spring mvc 中的 jsp 上显示验证消息

java - 从服务器响应写入(下载)文件时如何忽略内容长度异常?

Eclipse上Java编译错误