quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.87k stars 2.71k forks source link

quarkus-maven-plugin:2.1.0.Final:create fails when `-DplatformVersion=2.1.0.Final` is specified #19083

Closed rsvoboda closed 2 years ago

rsvoboda commented 3 years ago

Describe the bug

quarkus-maven-plugin:2.1.0.Final:create fails when -DplatformVersion=2.1.0.Final is specified

Running rm -rf app-generated-skeleton && mvn io.quarkus:quarkus-maven-plugin:2.1.0.Final:create -DprojectGroupId=my-groupId -DprojectArtifactId=app-generated-skeleton -DprojectVersion=1.0.0-SNAPSHOT -DpackageName=org.my.group -DplatformVersion=2.1.0.Final -Dextensions=quarkus-infinispan-client ends up with failure. Running the same command but using 2.0.0.Final works.

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.1.0.Final:create (default-cli) on project standalone-pom: Multiple platforms were matching the requested platform BOM coordinates io.quarkus.platform:*:2.1.0.Final:
[ERROR] - io.quarkus.platform:quarkus-bom::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-optaplanner-bom::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-kogito-bom::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-qpid-jms-bom::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-cassandra-bom::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-camel-bom::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-hazelcast-client::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-debezium-bom::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-blaze-persistence-bom::pom:2.1.0.Final
[ERROR] - io.quarkus.platform:quarkus-google-cloud-services-bom::pom:2.1.0.Final
[ERROR] -> [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/MojoExecutionException

This is obviously related to the split of the BOM, when I drop -DplatformVersion=2.1.0.Final from the command the project gets generated.

Expected behavior

Project gets generated using quarkus-bom when -DplatformVersion=2.1.0.Final is specified

There are some defaults used as when no -DplatformVersion=2.1.0.Final is used, project gets generated.

Seems like the the default for ArtifactId gets reset when platform version is specified.

Actual behavior

Build failure

How to Reproduce?

rm -rf app-generated-skeleton && mvn io.quarkus:quarkus-maven-plugin:2.1.0.Final:create -DprojectGroupId=my-groupId -DprojectArtifactId=app-generated-skeleton -DprojectVersion=1.0.0-SNAPSHOT -DpackageName=org.my.group -DplatformVersion=2.1.0.Final -Dextensions=quarkus-infinispan-client

Output of uname -a or ver

macOS BigSur

Output of java -version

Java 11

GraalVM version (if different from Java)

No response

Quarkus version or git rev

Quarkus 2.1.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

quarkus-bot[bot] commented 3 years ago

/cc @quarkusio/devtools

kshpak commented 3 years ago

The project can be generated, but it's caused by https://github.com/quarkusio/quarkus/issues/19250

rsvoboda commented 2 years ago

rm -rf app-generated-skeleton && mvn io.quarkus:quarkus-maven-plugin:2.6.3.Final:create -DprojectGroupId=my-groupId -DprojectArtifactId=app-generated-skeleton -DprojectVersion=1.0.0-SNAPSHOT -DpackageName=org.my.group -DplatformVersion=2.6.3.Final -Dextensions=quarkus-infinispan-client works fine, closing