Skip to content

Conversation

@desruisseaux
Copy link
Contributor

Convert all APT files except usage.apt.vm from the APT format to Markdown, together with changes in the text. Each file is moved by a separated commit with a message that summarize the changes. Broadly, the changes are:

  • Removal of sections that applied only when Maven was executed on Java 8, since Maven 4 requres Java 17.
  • Removal of sentences that, while still true for Maven 3, are not true anymore in Maven 4 (e.g. saying that Java 8 is the default version).
  • Removal of references to external sites that are not available anymore.
  • Addition of "Maven 3" and "Maven 4" sections when the way to configure something is different in these two versions.

@desruisseaux desruisseaux requested a review from Bukama July 1, 2025 11:21
Copy link
Contributor

@Bukama Bukama left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
Most comments are small things I think :)

To provide you with better understanding on some usages of the Compiler Plugin,
you can take a look into the following examples:

* [Compile using A Different JDK](./examples/compile-using-different-jdk.html)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* [Compile using A Different JDK](./examples/compile-using-different-jdk.html)
* [Compile Using A Different JDK](./examples/compile-using-different-jdk.html)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have inconsistencies in the lower/upper case titles not only in this list, but also in the title of various examples/*.md files. I'm often confused about what the English rules are on this matter, so I don't really know in which direction to go.

…sor.

Avoid the use of a property that may not be defined on the user's machine.
… with no change in the text.

We can use the format (APT versus Markdown) as a way to identify which files have been updated from Maven 3 to Maven 4.
…ed anymore.

The new page is incomplete as it does not yet mention the replacement (`target/javac-test.args` is not really the replacement).
This is because the code generating the replacement has not yet been merged. It is pending argreement to reach on mailing list.
…owing changes:

- Make more visible that users compiling for Java 9+ have nothing special to do.
- Remove the text about how to use toolchain for compiling with Java 9+.
  It was obsolete since Maven 4 requires Java 17.
- Adapt the text about how to use toolchain for compiling with a old JDK.
… the following changes:

* Remove the mention of `compilerVersion`, which is not supported anymore in plugin version 4.
  The version is either managed by the toolchain, or included in the path to the executable.
…he following changes:

* Insist that `--release` should be used instead.
* Replace "JRE" term by "JDK" since the former is no longer used.
* Use more recent Java version in the example.
* Remove the sentence saying that the `release` property is replaced by `-source` and `-target`
  on Java 8 or earlier. This feature has been removed in plugin 4 since it requires Java 17.
… following changes:

* Version 4 of the Maven compiler plugin additionally accepts the 'k', 'M' and 'G' suffixes.
… changes:

* Put the current example in a "Maven 3" section.
* Add a "Maven 4" section.
…changes:

A significant change is that large parts of the explanation about JEP-238
("forward compatibility problem") have been removed for the following reasons:

* We assume that multi-releases is now known well enough.
* The explanation used an obsolete example (Maven running on Java 6).
* The section was showing how to NOT use multi-releases (using reflection),
  which may be more a distraction than a help for the purpose of this page.

Removed most of the patterns for building a multi-releases project with Maven 3,
because many of them were referencing external web sites which are not available
anymore, or with content not obviously about multi-releases.
In particular, removed the following references:

* Reference to Animal Sniffer plugin, which is replaced by the `--release` option.
* Page http://word-bits.flurg.com/multrelease-jars/ is not available anymore (404).
* Page http://in.relation.to/2017/02/13/building-multi-release-jars-with-maven/ is blocked (security).
* Page http://www.russgold.net/sw/2018/04/easier-than-it-looks/ refers to above-cited blocked page.

Replaced "Maven module" by "Maven subproject" term for avoiding confusion with JPMS modules.
Removed the "all IDEs can only have one JDK per Maven Project, whereas with multi release you want to specify it per source folder."
This is not exactly true. We do not necessarily want different JDK, only different values for the `--release` option.

Added a section about multi-releases JAR projects with Maven 4.
* Remove the sentence saying that Java 8 is the default version.
  Version 4 of the plugin does not set a default version anymore.
@desruisseaux desruisseaux merged commit b58e98a into apache:master Jul 3, 2025
26 checks passed
@github-actions github-actions bot added this to the 4.0.0-beta-3 milestone Jul 3, 2025
@desruisseaux desruisseaux deleted the documentation branch July 3, 2025 08:51
@desruisseaux desruisseaux added the documentation Improvements or additions to documentation label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants