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