Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mvn quarkus:add-extension broken always adding bom #16264

Closed
ia3andy opened this issue Apr 6, 2021 · 6 comments · Fixed by #16290
Closed

mvn quarkus:add-extension broken always adding bom #16264

ia3andy opened this issue Apr 6, 2021 · 6 comments · Fixed by #16290
Assignees
Labels
kind/bug Something isn't working priority/urgent
Milestone

Comments

@ia3andy
Copy link
Contributor

ia3andy commented Apr 6, 2021

Describe the bug

Even when the bom is already present, the quarkus:add-extension adds the bom to the project again.

mvn quarkus:add-extension -Dextensions=resteasy-jackson                                                        127 master!?
executing mvnw instead of mvn
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< io.lavajug:lavajug-quarkus-todo >-------------------
[INFO] Building lavajug-quarkus-todo 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- quarkus-maven-plugin:1.13.0.Final:add-extension (default-cli) @ lavajug-quarkus-todo ---
[SUCCESS] ✅ Extension io.quarkus:quarkus-bom has been installed
[SUCCESS] ✅ Extension io.quarkus:quarkus-resteasy-jackson has been installed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.400 s
[INFO] Finished at: 2021-04-06T11:32:38+02:00
[INFO] ------------------------------------------------------------------------

Resulting in twice the same bom in the pom.xml:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-bom</artifactId>
        <version>1.13.0.Final</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>

Expected behavior

It should not add the bom when already present

To Reproduce

Create a base project https://code.quarkus.io/d

Use the command:

mvn quarkus:add-extension -Dextensions=resteasy-jackson  

This also affect the CLI (qs add resteasy-jackson)

@ia3andy ia3andy added the kind/bug Something isn't working label Apr 6, 2021
@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 6, 2021

FYI: when switching quarkus.platform.artifact-id from quarkus-universe-bom to quarkus-bom:

<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>

Then it doesn't add it anymore, but it's still wrong to add it with the universe bom..

@gsmet
Copy link
Member

gsmet commented Apr 6, 2021

@aloubyansky I thought you had fixed this one already?

@aloubyansky
Copy link
Member

@gsmet it was related but different. It was for 1.11.x, it's on different JSON format. In 1.13.x extensions may have multiple platform origins in the JSON.

@famod
Copy link
Member

famod commented Apr 6, 2021

@aloubyansky does this have anything to do with #14164?

@aloubyansky
Copy link
Member

Right, that should be fixed with this one as well, assuming the parent imports the BOM that includes the extension being added.

@famod
Copy link
Member

famod commented Apr 6, 2021

Sounds good, will assign it to you then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/urgent
Projects
None yet
4 participants