2017-02-16 131 views
1

我正在关注有助于创建启动项目的Apache Apex相关文档。 https://apex.apache.org/docs/apex-3.4/apex_development_setup/#creating-new-apex-project创建新的Apache Apex项目时出现Maven原型错误

在执行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 

这个错误的原因是什么?

+0

我试过了mvn命令,它对我有用。不知道为什么它不适合你。失败是否一直发生或是否是一次性的?其一致性为 – ashwin111

+0

。其重复的同样的错误 – frewper

回答

2

可能有与您的互联网连接到Maven存储库的问题。尝试手动下载必要的工件:

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