创建新的Apache Apex项目时Maven原型错误



我正在遵循与Apache Apex相关的文档,该文档有助于创建启动项目。https://apex.apache.org/docs/apex-3.4/apex_development_setup/#creating-new-apex-project

执行Maven命令时,

@echo off
@rem Script for creating a new application
setlocal
mvn archetype:generate -DarchetypeGroupId=org.apache.apex -DarchetypeArtifactId=apex-app-archetype -DarchetypeVersion=3.5.0 -DgroupId=com.example -Dpackage=com.example.myapexapp -DartifactId=myapexapp -Dversion=1.0-SNAPSHOT
endlocal

我面临以下问题。

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.0:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.0:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:3.0.0:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo.maven.apache.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 7fdb0195c216fb3cbb981a7d1454af1e1139c15f for http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 7fdb0195c216fb3cbb981a7d1454af1e1139c15f for http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0
Downloaded: http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0.pom (2 KB at 0.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/apex/apex/3.5.0/apex-3.5.0.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 699f18e175976623c84ada3e48ef32301cf8c30b for http://repo.maven.apache.org/maven2/org/apache/apex/apex/3.5.0/apex-3.5.0.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 699f18e175976623c84ada3e48ef32301cf8c30b for http://repo.maven.apache.org/maven2/org/apache/apex/apex/3.5.0/apex-3.5.0.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/apex/apex/3.5.0/apex-3.5.0.pom (17 KB at 7.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0.jar
[WARNING] Checksum validation failed, expected <!DOCTYPE but is da76067a61f0fc02442cb2f09a9f8934e437cf2e for http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0
[WARNING] Checksum validation failed, expected <!DOCTYPE but is da76067a61f0fc02442cb2f09a9f8934e437cf2e for http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0
Downloaded: http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0.jar (2 KB at 0.3 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.953s
[INFO] Finished at: Thu Feb 16 11:51:24 IST 2017
[INFO] Final Memory: 16M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.0:generate (default-cli) on project standalone-pom: The defined artifact is not an archetype -> [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存储库的连接可能存在问题。尝试手动下载必要的工件:

mvn dependency:get  -DremoteRepositories=http://repo1.maven.org/maven2/ -DgroupId=org.apache.apex -DartifactId=apex-app-archetype -Dversion=3.5.0

相关内容

  • 没有找到相关文章

最新更新