【发布时间】:2016-07-19 22:32:43
【问题描述】:
我正在尝试使用以下命令在终端中创建一个新的 Maven 项目:
mvn archetype:generate -DgroupId=com.my.domain -DartifactId=myproject -DarchetypeArtifactId=wildfly-javaee7-webapp-archetype -DinteractiveMode=false
所以我尝试使用 Wildfly 原型 wildfly-javaee7-webapp-archetype。
我收到以下错误...
[INFO] Generating project in Batch mode
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/archetypes/wildfly-javaee7-webapp-archetype/1.0/wildfly-javaee7-webapp-archetype-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.860 s
[INFO] Finished at: 2016-03-31T14:35:27+02:00
[INFO] Final Memory: 16M/188M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.maven.archetypes:wildfly-javaee7-webapp-archetype:1.0) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
...这意味着 Maven 正在尝试在 https://repo.maven.apache.org 下载原型,这是不正确的,因为原型是由 http://mvnrepository.com/artifact/org.wildfly.archetype 提供的。
如何更改来源或如何添加其他来源?还是我错过了什么不同的东西?
【问题讨论】:
-
你的 pom 包含哪些存储库?
标签: java maven jboss wildfly maven-archetype