gnodet commented on code in PR #1217:
URL:
https://github.com/apache/maven-compiler-plugin/pull/1217#discussion_r4801797135
##########
pom.xml:
##########
@@ -196,6 +228,54 @@ under the License.
</plugin>
</plugins>
</pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-java-build-version</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireJavaVersion>
+ <!--
+ Building this plugin requires JDK 24+ so that the
java.lang.classfile
+ classes in src/main/java24/ can always be compiled with
-release 24.
+ The compiled plugin JAR targets JDK 17 for main sources
and JDK 24
+ for the classfile-backed code, and runs on any JVM >= 17.
+ -->
+ <version>[24,)</version>
Review Comment:
This was addressed in subsequent commits. The enforcer now requires `[25,)`
and the `src/main/java24` source directory is active in the `<sources>` block
(not commented out). The java24 directory exists and contains the
`java.lang.classfile`-backed `ByteCodeTransformer`. The comment accurately
describes the current state.
_Claude Code on behalf of Guillaume Nodet_
##########
.github/workflows/maven-verify.yml:
##########
@@ -26,9 +26,8 @@ jobs:
name: Verify
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v5
with:
- jdk-distribution-matrix: '[ "temurin", "zulu", "microsoft" ]'
+ ff-jdk: '25'
Review Comment:
The JDK 25-only matrix is a direct consequence of the enforcer requiring
`[25,)` — the java24 sources use `java.lang.classfile` (standard since JDK 24)
and must be compiled with `-release 24`. The build cannot run on JDK 17–24.
The plugin itself still targets JDK 17+ at runtime. Testing on older JDKs
would require a separate mechanism (e.g., invoker tests with toolchains), not
the CI build matrix.
Added a comment to the CI workflow explaining the JDK and distribution
constraints.
_Claude Code on behalf of Guillaume Nodet_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]