Home > front end >  Failed to execute goal generate - desired archetype does not exists (org:flink-walkthrough-datastrea
Failed to execute goal generate - desired archetype does not exists (org:flink-walkthrough-datastrea

Time:06-28

I am trying to follow the official tutorial for Fraud Detection with the DataStream API.

After installing the prerequisites, I execute the following command:

$ mvn archetype:generate \
    -DarchetypeGroupId=org.apache.flink \
    -DarchetypeArtifactId=flink-walkthrough-datastream-java \
    -DarchetypeVersion=1.15.0 \
    -DgroupId=frauddetection \
    -DartifactId=frauddetection \
    -Dversion=0.1 \
    -Dpackage=spendreport \
    -DinteractiveMode=false

I encounter the following error:

C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0> mvn archetype:generate -DarchetypeGroupId=org.apache.flink -DarchetypeArtifactId=flink-walkthrough-datastream-java -DarchetypeVersion=1.15.0 -DgroupId=frauddetection -DartifactId=frauddetection -Dversion=0.1 -Dpackage=spendreport  -DinteractiveMode=false
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.flink:flink-scala_2.12:jar:1.15.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.flink:flink-scala_${scala.binary.version}:1.15.0, C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0\flink-scala\pom.xml, line 31, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.flink:flink-streaming-scala_2.12:jar:1.15.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.flink:flink-streaming-scala_${scala.binary.version}:1.15.0, C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0\flink-streaming-scala\pom.xml, line 31, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.flink:flink-hadoop-compatibility_2.12:jar:1.15.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.flink:flink-hadoop-compatibility_${scala.binary.version}:1.15.0, C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0\flink-connectors\flink-hadoop-compatibility\pom.xml, line 32, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.flink:flink-hcatalog_2.12:jar:1.15.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.flink:flink-hcatalog_${scala.binary.version}:1.15.0, C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0\flink-connectors\flink-hcatalog\pom.xml, line 32, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.flink:flink-connector-hive_2.12:jar:1.15.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.flink:flink-connector-hive_${scala.binary.version}:1.15.0, C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0\flink-connectors\flink-connector-hive\pom.xml, line 33, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.flink:flink-connector-cassandra_2.12:jar:1.15.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.flink:flink-connector-cassandra_${scala.binary.version}:1.15.0, C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0\flink-connectors\flink-connector-cassandra\pom.xml, line 33, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.flink:flink-sql-connector-hive-1.2.2_2.12:jar:1.15.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.flink:flink-sql-connector-hive-1.2.2_${scala.binary.version}:1.15.0, C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0\flink-connectors\flink-sql-connector-hive-1.2.2\pom.xml, line 33, column 14
[WARNING]
...
 (few Warnings here, removed due size)
...
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: windows
[INFO] os.detected.arch: x86_64
[INFO] os.detected.bitness: 64
[INFO] os.detected.version: 10.0
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 0
[INFO] os.detected.classifier: windows-x86_64
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Flink :                                                            [pom]
[INFO] Flink : Annotations                                                [jar]
[INFO] Flink : Architecture Tests                                         [pom]
[INFO] Flink : Architecture Tests : Base                                  [jar]
[INFO] Flink : Test utils :                                               [pom]
[INFO] Flink : Test utils : Junit                                         [jar]
[INFO] Flink : Metrics :                                                  [pom]
[INFO] Flink : Metrics : Core                                             [jar]
[INFO] Flink : Core                                                       [jar]
[INFO] Flink : Table :                                                    [pom]
[INFO] Flink : Table : Common                                             [jar]
[INFO] Flink : Table : API Java                                           [jar]
[INFO] Flink : Java                                                       [jar]
[INFO] Flink : Connectors :                                               [pom]
[INFO] Flink : Connectors : File Sink Common                              [jar]
[INFO] Flink : RPC :                                                      [pom]
[INFO] Flink : RPC : Core                                                 [jar]
[INFO] Flink : RPC : Akka                                                 [jar]
[INFO] Flink : RPC : Akka-Loader                                          [jar]
[INFO] Flink : Queryable state :                                          [pom]
[INFO] Flink : Queryable state : Client Java                              [jar]
[INFO] Flink : FileSystems :                                              [pom]
[INFO] Flink : FileSystems : Hadoop FS                                    [jar]
[INFO] Flink : Runtime                                                    [jar]
[INFO] Flink : Streaming Java                                             [jar]
[INFO] Flink : Table : API bridge base                                    [jar]
[INFO] Flink : Table : API Java bridge                                    [jar]
[INFO] Flink : Table : Code Splitter                                      [jar]
[INFO] Flink : Optimizer                                                  [jar]
[INFO] Flink : Clients                                                    [jar]
[INFO] Flink : DSTL                                                       [pom]
[INFO] Flink : DSTL : DFS                                                 [jar]
[INFO] Flink : State backends :                                           [pom]
[INFO] Flink : State backends : RocksDB                                   [jar]
[INFO] Flink : State backends : Changelog                                 [jar]
[INFO] Flink : Test utils : Utils                                         [jar]
[INFO] Flink : Libraries :                                                [pom]
[INFO] Flink : Libraries : CEP                                            [jar]
[INFO] Flink : Table : Runtime                                            [jar]
[INFO] Flink : Scala                                                      [jar]
[INFO] Flink : Table : SQL Parser                                         [jar]
[INFO] Flink : Table : SQL Parser Hive                                    [jar]
[INFO] Flink : Table : API Scala                                          [jar]
[INFO] Flink : Test utils : Connectors                                    [jar]
[INFO] Flink : Architecture Tests : Test                                  [jar]
[INFO] Flink : Connectors : Base                                          [jar]
[INFO] Flink : Connectors : Files                                         [jar]
[INFO] Flink : Examples :                                                 [pom]
[INFO] Flink : Examples : Batch                                           [jar]
[INFO] Flink : Connectors : Hadoop compatibility                          [jar]
[INFO] Flink : Tests                                                      [jar]
[INFO] Flink : Streaming Scala                                            [jar]
[INFO] Flink : Table : API Scala bridge                                   [jar]
[INFO] Flink : Table : Planner                                            [jar]
[INFO] Flink : Formats :                                                  [pom]
[INFO] Flink : Format : Common                                            [jar]
[INFO] Flink : Formats : Csv                                              [jar]
[INFO] Flink : Formats : Hadoop bulk                                      [jar]
[INFO] Flink : Formats : Orc                                              [jar]
[INFO] Flink : Formats : Orc nohive                                       [jar]
[INFO] Flink : Formats : Avro                                             [jar]
[INFO] Flink : Formats : Parquet                                          [jar]
[INFO] Flink : Connectors : Hive                                          [jar]
[INFO] Flink : Python                                                     [jar]
[INFO] Flink : Table : SQL Client                                         [jar]
[INFO] Flink : Connectors : AWS Base                                      [jar]
[INFO] Flink : Connectors : Cassandra                                     [jar]
[INFO] Flink : Formats : Json                                             [jar]
[INFO] Flink : Connectors : Elasticsearch base                            [jar]
[INFO] Flink : Connectors : Elasticsearch 6                               [jar]
[INFO] Flink : Connectors : Elasticsearch 7                               [jar]
[INFO] Flink : Connectors : Google PubSub                                 [jar]
[INFO] Flink : Connectors : HBase base                                    [jar]
[INFO] Flink : Connectors : HBase 1.4                                     [jar]
[INFO] Flink : Connectors : HBase 2.2                                     [jar]
[INFO] Flink : Connectors : JDBC                                          [jar]
[INFO] Flink : Metrics : JMX                                              [jar]
[INFO] Flink : Formats : Avro confluent registry                          [jar]
[INFO] Flink : Connectors : Kafka                                         [jar]
[INFO] Flink : Connectors : Amazon Kinesis Data Streams                   [jar]
[INFO] Flink : Connectors : Kinesis                                       [jar]
[INFO] Flink : Connectors : Nifi                                          [jar]
[INFO] Flink : Connectors : Pulsar                                        [jar]
[INFO] Flink : Connectors : RabbitMQ                                      [jar]
[INFO] Flink : Architecture Tests : Production                            [jar]
[INFO] Flink : FileSystems : Hadoop FS shaded                             [jar]
[INFO] Flink : FileSystems : S3 FS Base                                   [jar]
[INFO] Flink : FileSystems : S3 FS Hadoop                                 [jar]
[INFO] Flink : FileSystems : S3 FS Presto                                 [jar]
[INFO] Flink : FileSystems : OSS FS                                       [jar]
[INFO] Flink : FileSystems : Azure FS Hadoop                              [jar]
[INFO] Flink : FileSystems : Google Storage FS Hadoop                     [jar]
[INFO] Flink : Runtime web                                                [jar]
[INFO] Flink : Connectors : HCatalog                                      [jar]
[INFO] Flink : Connectors : Amazon Kinesis Data Firehose                  [jar]
[INFO] Flink : Connectors : SQL : Elasticsearch 6                         [jar]
[INFO] Flink : Connectors : SQL : Elasticsearch 7                         [jar]
[INFO] Flink : Connectors : SQL : HBase 1.4                               [jar]
[INFO] Flink : Connectors : SQL : HBase 2.2                               [jar]
[INFO] Flink : Connectors : SQL : Hive 1.2.2                              [jar]
[INFO] Flink : Connectors : SQL : Hive 2.2.0                              [jar]
[INFO] Flink : Connectors : SQL : Hive 2.3.6                              [jar]
[INFO] Flink : Connectors : SQL : Hive 3.1.2                              [jar]
[INFO] Flink : Connectors : SQL : Kafka                                   [jar]
[INFO] Flink : Connectors : SQL : Amazon Kinesis Data Streams             [jar]
[INFO] Flink : Connectors : SQL : Amazon Kinesis Data Firehose            [jar]
[INFO] Flink : Connectors : SQL : Kinesis                                 [jar]
[INFO] Flink : Connectors : SQL : Pulsar                                  [jar]
[INFO] Flink : Connectors : SQL : RabbitMQ                                [jar]
[INFO] Flink : Formats : Sequence file                                    [jar]
[INFO] Flink : Formats : Compress                                         [jar]
[INFO] Flink : Formats : Avro AWS Glue Schema Registry                    [jar]
[INFO] Flink : Formats : JSON AWS Glue Schema Registry                    [jar]
[INFO] Flink : Formats : SQL Orc                                          [jar]
[INFO] Flink : Formats : SQL Parquet                                      [jar]
[INFO] Flink : Formats : SQL Avro                                         [jar]
[INFO] Flink : Formats : SQL Avro Confluent Registry                      [jar]
[INFO] Flink : Examples : Streaming                                       [jar]
[INFO] Flink : Examples : Table                                           [jar]
[INFO] Flink : Examples : Build Helper :                                  [pom]
[INFO] Flink : Examples : Build Helper : Streaming State machine          [jar]
[INFO] Flink : Examples : Build Helper : Streaming Google PubSub          [jar]
[INFO] Flink : Container                                                  [jar]
[INFO] Flink : Queryable state : Runtime                                  [jar]
[INFO] Flink : Dist-Scala                                                 [jar]
[INFO] Flink : Kubernetes                                                 [jar]
[INFO] Flink : Yarn                                                       [jar]
[INFO] Flink : Table : API Java Uber                                      [jar]
[INFO] Flink : Table : Planner Loader Bundle                              [jar]
[INFO] Flink : Table : Planner Loader                                     [jar]
[INFO] Flink : Libraries : Gelly                                          [jar]
[INFO] Flink : Libraries : Gelly scala                                    [jar]
[INFO] Flink : Libraries : Gelly Examples                                 [jar]
[INFO] Flink : External resources :                                       [pom]
[INFO] Flink : External resources : GPU                                   [jar]
[INFO] Flink : Metrics : Dropwizard                                       [jar]
[INFO] Flink : Metrics : Graphite                                         [jar]
[INFO] Flink : Metrics : InfluxDB                                         [jar]
[INFO] Flink : Metrics : Prometheus                                       [jar]
[INFO] Flink : Metrics : StatsD                                           [jar]
[INFO] Flink : Metrics : Datadog                                          [jar]
[INFO] Flink : Metrics : Slf4j                                            [jar]
[INFO] Flink : Libraries : CEP Scala                                      [jar]
[INFO] Flink : Libraries : State processor API                            [jar]
[INFO] Flink : Dist                                                       [jar]
[INFO] Flink : Yarn Tests                                                 [jar]
[INFO] Flink : E2E Tests :                                                [pom]
[INFO] Flink : E2E Tests : CLI                                            [jar]
[INFO] Flink : E2E Tests : Parent Child classloading program              [jar]
[INFO] Flink : E2E Tests : Parent Child classloading lib-package          [jar]
[INFO] Flink : E2E Tests : Dataset allround                               [jar]
[INFO] Flink : E2E Tests : Dataset Fine-grained recovery                  [jar]
[INFO] Flink : E2E Tests : Datastream allround                            [jar]
[INFO] Flink : E2E Tests : Batch SQL                                      [jar]
[INFO] Flink : E2E Tests : Stream SQL                                     [jar]
[INFO] Flink : E2E Tests : Distributed cache via blob                     [jar]
[INFO] Flink : E2E Tests : High parallelism iterations                    [jar]
[INFO] Flink : E2E Tests : Stream stateful job upgrade                    [jar]
[INFO] Flink : E2E Tests : Queryable state                                [jar]
[INFO] Flink : E2E Tests : Local recovery and allocation                  [jar]
[INFO] Flink : E2E Tests : Elasticsearch 6                                [jar]
[INFO] Flink : Quickstart :                                               [pom]
[INFO] Flink : Quickstart : Java                              [maven-archetype]
[INFO] Flink : Quickstart : Scala                             [maven-archetype]
[INFO] Flink : E2E Tests : Quickstart                                     [jar]
[INFO] Flink : E2E Tests : Confluent schema registry                      [jar]
[INFO] Flink : E2E Tests : Stream state TTL                               [jar]
[INFO] Flink : E2E Tests : SQL client                                     [jar]
[INFO] Flink : E2E Tests : File sink                                      [jar]
[INFO] Flink : E2E Tests : State evolution                                [jar]
[INFO] Flink : E2E Tests : RocksDB state memory control                   [jar]
[INFO] Flink : E2E Tests : Common                                         [jar]
[INFO] Flink : E2E Tests : Metrics availability                           [jar]
[INFO] Flink : E2E Tests : Metrics reporter prometheus                    [jar]
[INFO] Flink : E2E Tests : Heavy deployment                               [jar]
[INFO] Flink : E2E Tests : Connectors : Google PubSub                     [jar]
[INFO] Flink : E2E Tests : Streaming Kafka base                           [jar]
[INFO] Flink : E2E Tests : Streaming Kafka                                [jar]
[INFO] Flink : E2E Tests : Plugins :                                      [pom]
[INFO] Flink : E2E Tests : Plugins : Dummy fs                             [jar]
[INFO] Flink : E2E Tests : Plugins : Another dummy fs                     [jar]
[INFO] Flink : E2E Tests : TPCH                                           [jar]
[INFO] Flink : E2E Tests : Streaming Kinesis                              [jar]
[INFO] Flink : E2E Tests : Elasticsearch 7                                [jar]
[INFO] Flink : E2E Tests : Common Kafka                                   [jar]
[INFO] Flink : E2E Tests : TPCDS                                          [jar]
[INFO] Flink : E2E Tests : Netty shuffle memory control                   [jar]
[INFO] Flink : E2E Tests : Python                                         [jar]
[INFO] Flink : E2E Tests : HBase                                          [jar]
[INFO] Flink : E2E Tests : Pulsar                                         [jar]
[INFO] Flink : E2E Tests : Avro AWS Glue Schema Registry                  [jar]
[INFO] Flink : E2E Tests : JSON AWS Glue Schema Registry                  [jar]
[INFO] Flink : E2E Tests : Scala                                          [jar]
[INFO] Flink : E2E Tests : Kinesis SQL tests                              [jar]
[INFO] Flink : E2E Tests : Kinesis Firehose SQL tests                     [jar]
[INFO] Flink : State backends : Heap spillable                            [jar]
[INFO] Flink : Table : Test Utils                                         [jar]
[INFO] Flink : Contrib :                                                  [pom]
[INFO] Flink : Contrib : Connectors : Wikiedits                           [jar]
[INFO] Flink : FileSystems : Tests                                        [jar]
[INFO] Flink : Docs                                                       [jar]
[INFO] Flink : Walkthrough :                                              [pom]
[INFO] Flink : Walkthrough : Common                                       [jar]
[INFO] Flink : Walkthrough : Datastream Java                  [maven-archetype]
[INFO] Flink : Walkthrough : Datastream Scala                 [maven-archetype]
[INFO] Flink : Tools : CI : Java                                          [jar]
[INFO]
[INFO] -------------------< org.apache.flink:flink-parent >--------------------
[INFO] Building Flink : 1.15.0                                          [1/206]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.2.1:generate (default-cli) > generate-sources @ flink-parent >>>
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (validate) @ flink-parent ---
[INFO]
[INFO] --- spotless-maven-plugin:2.4.2:check (spotless-check) @ flink-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-maven-version) @ flink-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-maven) @ flink-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (ban-unsafe-snakeyaml) @ flink-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (ban-unsafe-jackson) @ flink-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (forbid-log4j-1) @ flink-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (forbid-direct-akka-rpc-dependencies) @ flink-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (forbid-direct-table-planner-dependencies) @ flink-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-versions) @ flink-parent ---
[INFO]
[INFO] --- directory-maven-plugin:0.1:directory-of (directories) @ flink-parent ---
[INFO] Directory of org.apache.flink:flink-parent set to: C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0
[INFO]
[INFO] <<< maven-archetype-plugin:3.2.1:generate (default-cli) < generate-sources @ flink-parent <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.2.1:generate (default-cli) @ flink-parent ---
[INFO] Generating project in Batch mode
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repository with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
[WARNING] The POM for org:flink-walkthrough-datastream-java:jar:1 is missing, no dependency information available
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping Flink :
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Flink : 1.15.0:
[INFO]
[INFO] Flink : ............................................ FAILURE [  6.685 s]
[INFO] Flink : Annotations ................................ SKIPPED

...
   (A lot of more of "SKIPPED" I had to delete due to size limitations on SO) 
 ...
[INFO] Flink : Walkthrough : Common ....................... SKIPPED
[INFO] Flink : Walkthrough : Datastream Java .............. SKIPPED
[INFO] Flink : Walkthrough : Datastream Scala ............. SKIPPED
[INFO] Flink : Tools : CI : Java .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.840 s
[INFO] Finished at: 2022-06-24T14:03:24 02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project flink-parent: The desired archetype does not exist (org:flink-walkthrough-datastream-java:1) -> [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

What can be the problem here? I have the following environment:

C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0> mvn --version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: C:\Program Files\apache-maven-3.8.6
Java version: 11.0.15, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11.0.15
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
C:\Users\bk73027\Projects\FlinkDemo\flink-1.15.0>

I have downloaded the latest stable release from here https://flink.apache.org/downloads.html#apache-flink-1150 (Apache Flink 1.15.0 for Scala 2.12)

CodePudding user response:

Can we see your pom.xml ?

Maybe you have to add flink-walkthroughs dependency to your pom.xml

https://mvnrepository.com/artifact/org.apache.flink/flink-walkthroughs/1.15.0

CodePudding user response:

The problem was that I did not wrap my commend properly for Powershell.

mvn archetype:generate "-DarchetypeGroupId=org.apache.flink     -DarchetypeArtifactId=flink-walkthrough-datastream-java     -DarchetypeVersion=1.15.0     -DgroupId=frauddetection     -DartifactId=frauddetection
     -Dversion=0.1     -Dpackage=spendreport     -DinteractiveMode=false"

I am new to Windows Powershell, and used bash-like syntax.

  • Related