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

quarkus subcommands change POM formatting and drops XML comments #39048

Closed
yrodiere opened this issue Feb 28, 2024 · 1 comment
Closed

quarkus subcommands change POM formatting and drops XML comments #39048

yrodiere opened this issue Feb 28, 2024 · 1 comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins kind/bug Something isn't working

Comments

@yrodiere
Copy link
Member

Describe the bug

When I use quarkus ext add <something> in an application, the command will fully rewrite the POM, changing formatting and, critically, dropping XML comments (<!-- ... -->).

Expected behavior

quarkus subcommands manipulating the POM should not change its formatting, reorder properties or drop any meaningful information like XML comments.

This seems possible as, from what I've seen, quarkus update manages to do it using OpenRewrite.

Actual behavior

quarkus subcommands manipulating the POM change its formatting and drop XML comments.

I remember seeing them reorder Maven properties or dependencies as well, but I didn't check recently, so I may be wrong about that.

How to Reproduce?

Use quarkus ext add hibernate-search-orm-outbox-polling on a Quarkus application whose POM contains comments, e.g., https://github.com/quarkusio/search.quarkus.io where the POM contains this:

  <properties>
    <compiler-plugin.version>3.12.1</compiler-plugin.version>
    <maven.compiler.release>17</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
    <quarkus.version>3.7.3</quarkus.version>
    <revision>999-SNAPSHOT</revision>
    <skipITs>true</skipITs>
    <surefire-plugin.version>3.2.5</surefire-plugin.version>
    <test.jvm.args>-Xms2g -Xmx2g</test.jvm.args>
    <version.docker.plugin>0.44.0</version.docker.plugin>
    <version.formatter.plugin>2.23.0</version.formatter.plugin>
    <version.impsort-maven-plugin>1.9.0</version.impsort-maven-plugin>
    <!-- This version needs to match the version in src/main/docker/opensearch-custom.Dockerfile -->
    <version.opensearch>2.11</version.opensearch>
  </properties>

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

3.7.4

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

No response

Additional information

No response

@yrodiere yrodiere added kind/bug Something isn't working area/cli Related to quarkus cli (not maven/gradle/etc.) labels Feb 28, 2024
@yrodiere yrodiere added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Feb 28, 2024
@gsmet
Copy link
Member

gsmet commented Feb 29, 2024

Closed in favor of #39088 where I centralized all the info so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants