maven使用mvn archetype:generate命令創建項目骨架遇到的問題-flink-quickstart-java


輸入命令:
mvn archetype:generate \
     -DarchetypeGroupId=org.apache.flink \
     -DarchetypeArtifactId=flink-quickstart-java \
     -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \
     -DarchetypeVersion=1.3-SNAPSHOT \
     -DgroupId=org.test.flink \
     -DartifactId=flink-start \
     -Dversion=0.1 \
     -Dpackage=org.test.flink \
     -DinteractiveMode=false

報錯信息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate (default-cli) on project standalone-pom: archetypeCatalog 'https://repository.apache.org/content/repositories/snapshots/' is not supported anymore. Please read the plugin documentation for details. -> [Help 1]
 

修改輸入命令:

mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate\
     -DarchetypeGroupId=org.apache.flink \
     -DarchetypeArtifactId=flink-quickstart-java \
     -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \
     -DarchetypeVersion=1.3-SNAPSHOT \
     -DgroupId=org.test.flink \
     -DartifactId=flink-start \
     -Dversion=0.1 \
     -Dpackage=org.test.flink \
     -DinteractiveMode=false

 

成功

 

報錯:

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (E:\flink). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException

原因:編譯之后的-DgroupId、-DartifactId輸入不正確

 

showtooltip


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM