使用如下项目骨架创建flink项目,结果被官方的下面这个创建方式坑了。。
mvn archetype:generate \ -DarchetypeGroupId=org.apache.flink \ -DarchetypeArtifactId=flink-quickstart-java \ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \ -DarchetypeVersion=1.9-SNAPSHOT \ -DgroupId=wiki-edits \ -DartifactId=wiki-edits \ -Dversion=0.1 \ -Dpackage=wikiedits \ -DinteractiveMode=false
一直报如下错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1: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][ERROR]
刚开始以为是阿里云镜像站的问题,但是增加了几个都不行。后来终于查到是archetype插件的版本问题。
修改如下,问题解决:
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.9-SNAPSHOT -DgroupId=wiki-edits -DartifactId=wiki-edits -Dversion=0.1 -Dpackage=wikiedits -DinteractiveMode=falsemvn archetype:generate -DarchetypeGroupId=org.apache.flink -DarchetypeArtifactId=flink-quickstart-java -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ -DarchetypeVersion=1.3-SNAPSHOT