quarkusio / quarkus

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

quarkus-maven-plugin incompatible with Maven 4 #43867

Closed Giovds closed 3 hours ago

Giovds commented 4 hours ago

Describe the bug

On the getting started site the user is asked to generate a project with the following plugin

mvn io.quarkus.platform:quarkus-maven-plugin:3.15.1:create \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=getting-started \
    -Dextensions='rest'

When using maven 4 beta-4 the plugin fails with the following error:

Execution default-cli of goal io.quarkus.platform:quarkus-maven-plugin:3.15.1:create failed: A required class was missing while executing io.quarkus.platform:quarkus-maven-plugin:3.15.1:create: org/apache/maven/model/merge/ModelMerger

Expected behavior

I expect the build to succeed as it does with maven 3.x

Actual behavior

It fails due to an API incompatibility

How to Reproduce?

  1. Switch to maven 4 beta-4
  2. Execute mvn io.quarkus.platform:quarkus-maven-plugin:3.15.1:create -DprojectGroupId=org.acme -DprojectArtifactId=getting-started -Dextensions='rest'

Output of uname -a or ver

Darwin Kernel Version 24.0.0

Output of java -version

OpenJDK 64-Bit Server VM Zulu23

Quarkus version or git rev

No response

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

Maven 4

Additional information

This probably requires to https://github.com/fabric8io/maven-model-helper to be compatible with Maven 4, because it is used in the SmartPomMergeCodestartFileStrategyHandler.java

quarkus-bot[bot] commented 4 hours ago

/cc @quarkusio/devtools (maven)

gsmet commented 3 hours ago

Thanks for the report. We don't support Maven 4 for now. It's still a beta and it will require quite a lot of work on our side. Maybe we should find a place to mention it.

We will at some point for sure.

gastaldi commented 3 hours ago

Duplicate of https://github.com/quarkusio/quarkus/issues/37627