question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mvn quarkus:add-extension broken always adding bom

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
aloubyanskycommented, Apr 6, 2021

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

0reactions
famodcommented, Apr 6, 2021

Sounds good, will assign it to you then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building applications with Maven - Quarkus
Given that the Quarkus build process adds deployment dependencies of the extensions used in the application to the original application classpath, it could...
Read more >
Quarkus - Writing Your Own Extension
Quarkus extensions add a new developer focused behavior to the core offering, and consist of two distinct parts, buildtime augmentation and runtime ...
Read more >
Surefire is not picking up Junit 5 tests - Stack Overflow
add any JUnit extension you need such as --> <dependency> ... On my GitHub space I added a working sample maven project that...
Read more >
chore(deps): update dependency io.quarkus:quarkus ... - GitLab
chore(deps): update dependency io.quarkus:quarkus-maven-plugin to v2.
Read more >
CONTRIBUTING.md - quarkusio/quarkus - Sourcegraph
Don't forget to indicate your Quarkus, Java, Maven/Gradle and GraalVM version. ... It is a recommended install though when working on any extension...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found