Skip to content

Commit 46fee74

Browse files
committed
Update to Maven 4.0.0-rc-5 and add version recommendation
Maven 4.0.0-rc-5 includes the fix for the DefaultSourceRoot bug (apache/maven#10912, backported in #10917) that allows omitting <directory> elements from <source> declarations when using the default directory convention src/<module>/<scope>/<lang>. Changes: - Update CI workflow to use Maven 4.0.0-rc-5 - Add AsciiDoc include tags for Maven version (single source of truth) - Add [[recommended-maven4]] admonition in README.adoc - Add cross-reference to Maven 4 version recommendation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> Introduced in the course of support-and-care/maven-support-and-care#137
1 parent c518650 commit 46fee74

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ jobs:
207207
- name: Set up Maven 4
208208
uses: stCarolas/setup-maven@v5
209209
with:
210-
maven-version: '4.0.0-rc-4'
210+
# tag::maven-4-version[]
211+
maven-version: '4.0.0-rc-5'
212+
# end::maven-4-version[]
211213

212214
- name: Create .envrc with Java and Maven paths
213215
shell: bash

README.adoc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Meanwhile, we extended many examples to work (currently) with Maven 4 to demonst
4949
** See <<recommended-jdk>> for the recommended version for full CI (automated testing) compatibility.
5050
** For Maven 4 and xref:jigsaw-examples/example_gradle-project/README.adoc[Gradle example]: Java 17 or later is required.
5151
** For the xref:jigsaw-examples/example_compile-target-jdk8/README.adoc[cross-compilation example]: Java 8.
52-
. Install Maven 4 if you want to run the Maven 4 migrated examples (cf. <<maven-4-migration,migration to Maven 4>>).
52+
. Install Maven 4 if you want to run the Maven 4 migrated examples (cf. <<maven-4-migration,migration to Maven 4>> and <<recommended-maven4>>).
5353

5454
[[recommended-jdk]]
5555
[NOTE]
@@ -225,6 +225,21 @@ Corresponding JAR files are in `example_.../patchlib`.
225225
Many examples have been migrated to Maven 4 using the new https://maven.apache.org/plugins-archives/maven-compiler-plugin-LATEST-4.x/modules.html[Module Source Hierarchy] layout.
226226
The Maven 4 builds are located in `m4/` subdirectories within each example.
227227

228+
[[recommended-maven4]]
229+
[NOTE]
230+
.Recommended Maven 4 Version
231+
====
232+
The following Maven 4 version is used for CI and automated testing:
233+
234+
[source,yaml,indent=0]
235+
----
236+
include::.github/workflows/build.yml[tag=maven-4-version]
237+
----
238+
239+
Set `M4_HOME` to point to this version.
240+
For SDKMAN users: `sdk install maven 4...` (use the version shown above).
241+
====
242+
228243
=== Standard Migration Approach and Defaults
229244

230245
For most examples, the Maven 4 migration follows a straightforward pattern.

0 commit comments

Comments
 (0)