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

Take the version for an annotation processor from project dependencyManagement just like maven-compiler-plugin 3.12+ does #1644

Closed
famod opened this issue Jan 9, 2024 · 2 comments · Fixed by #1659
Assignees

Comments

@famod
Copy link

famod commented Jan 9, 2024

maven-compiler-plugin 3.12.0 (latest currently is 3.12.1) learned a new trick: https://issues.apache.org/jira/browse/MCOMPILER-391
This means that e.g. hibernate-jpamodelgen annotation processor in a Quarkus project (that imports the Quarkus BOM) can be defined without an explicit version (and you don't need to align the version on each Quarkus update):
Before:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.12.1</version>
    <configuration>
        <annotationProcessorPaths>
            <path>
                <groupId>org.hibernate.orm</groupId>
                <artifactId>hibernate-jpamodelgen</artifactId>
                <version>6.1.2.Final</version>
            </path>
        </annotationProcessorPaths>
    </configuration>
</plugin>

After:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.12.1</version>
    <configuration>
        <annotationProcessorPaths>
            <path>
                <groupId>org.hibernate.orm</groupId>
                <artifactId>hibernate-jpamodelgen</artifactId>
            </path>
        </annotationProcessorPaths>
    </configuration>
</plugin>

When I try to import/update such a project in Eclipse (2023-12), I'm getting a config error saying that the artifact was not found, with the version part of the coordinates being empty.

This is how it's done in the compiler-plugin: https://github.com/apache/maven-compiler-plugin/pull/180/files#diff-d4bac42d8f4c68d397ddbaa05c1cbbed7984ef6dc0bb9ea60739df78997e99ee

@famod famod changed the title Take the version for an annotation processor from project dependencyManagement just like `maven-compiler-plugin 3.12 does Take the version for an annotation processor from project dependencyManagement just like maven-compiler-plugin 3.12+ does Jan 9, 2024
@laeubi
Copy link
Member

laeubi commented Jan 9, 2024

@famod do you want t try providing a PR for this new behavior?

@famod
Copy link
Author

famod commented Jan 22, 2024

@laeubi I've gotten ill and I'm still not fully done with that. So please don't wait for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants