輸入命令:
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輸入不正確