Skip to content

Conversation

@desruisseaux
Copy link

The first commit reverts the change of import order. This change was done automatically by mvn install on my machine. I do not know why the automatic reformatting does two opposite things on our machine.

The second commit is the interesting one. It replaces the Maven 3 way to declare a processor by the Maven 4 way. It also contains some more minor editions such as replacing the 4-spaces indentation by a 2-spaces indentation, for consistency with what other examples use.

The third commit is only a file renaming, again for consistency with what other pages does.

…new dependency mechanism of Maven 4.

Change indentation from 4 spaces to 2 spaces for consistency with other examples in APT files.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${project.version}</version>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is misleading afaik, because if I use any project (let's say with version 1.0.0 and put this code snippet in compiler plugin would be set to 1.0.0 - which is just wrong.

In markdown file there is no variable replacement, isn't it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that, with the pages in APT format, the ${project.version} variable was replaced by the actual Maven compiler plugin version at site rendering time. Whether this replacement also happens for Markdown, I do not know. I though that we would discover that at the site staging phase, and change it if it doesn't work as expected.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes in .apt.vm (not sure about .apt) it gets replaced, but not in markdown.
Just tested it

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay. Thanks for checking. I let you chose whatever could be put in place then.


The following example shows, how to activate the Hibernate Processor.
The following example shows how to activate the Hibernate Processor.
Note: this configuration requires Maven 4 with Maven Compiler Plugin 4.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As not all users will instantly change to Maven 4, should be show the Maven 3 and Maven 4 way in this article?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to a previous question on the pull request: should we copy that pull request in its current form on the 3.x branch before to apply the changes proposed here?

I got the impression that we would have a different set of pages for Maven 3.x and Maven 4, but I'm not sure to understood correctly.

@Bukama Bukama merged commit cbca662 into Bukama:annotationprocessor Jun 30, 2025
@github-actions
Copy link

@Bukama The PR can't be associated to a milestone, because there is no open milestone. Please create a new milestone before merge.

@desruisseaux desruisseaux deleted the annotationprocessor branch June 30, 2025 16:19
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 this pull request may close these issues.

2 participants