我正在尝试使用基本的Flink快速入门示例。
https://ci.apache.org/projects/flink/flink-docs-release-1.2/quickstart/java_api_quickstart.html
我在Maven的第一步遇到错误。无论我是否尝试使用Maven或“curl”命令进行安装,我都会收到相同的错误“已定义的工件不是原型”:
命令:
mvn archetype:generate \
> -DarchetypeGroupId=org.apache.flink \
> -DarchetypeArtifactId=flink-quickstart-java \
> -DarchetypeVersion=1.2.0
响应:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository not defined. Using the one from [org.apache.flink:flink-quickstart-java:1.2.1] found in catalog remote
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.916 s
[INFO] Finished at: 2017-05-03T18:16:55+02:00
[INFO] Final Memory: 18M/280M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1: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 / Flink完全不熟悉,所以我很难确定从那时起可能发生的变化。有什么想法吗?
答案 0 :(得分:0)
仅定义原型是不够的。您还需要提供当前maven项目本身的详细信息。
mvn archetype:generate -DarchetypeGroupId=org.apache.flink -DarchetypeArtifactId=flink-quickstart-java -DarchetypeVersion=1.2.0 -DgroupId=com.example -DartifactId=flink -Dversion=0.1