You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ascheman (via GitHub)" <gi...@apache.org> on 2026/07/23 06:12:06 UTC
[PR] Pin maven-jar-plugin 3.5.1 in modular IT fixtures [maven-surefire]
ascheman opened a new pull request, #3398:
URL: https://github.com/apache/maven-surefire/pull/3398
The windows-latest jdk-11 CI cell fails for every PR since Maven 3.10.0-rc-1 became the IT baseline: its super-POM pins maven-jar-plugin 3.5.0, whose plexus-archiver 4.10.4 throws an NPE (`JarToolModularJarArchiver.fixLastModifiedTimeZipEntries`) when packaging modular JARs on Windows with JDK < 14 (no `jar --date`; POSIX attribute view is null on Windows). Details, reproducer and windows-runner validation: https://github.com/apache/maven-jar-plugin/issues/555
maven-jar-plugin 3.5.1 (released 2026-07-22) ships plexus-archiver 4.12.0 with the fix. This pins 3.5.1 explicitly in the four affected modular fixtures (`surefire-1733-junit4`, `surefire-1733-testng`, `surefire-2190`, `surefire-1993-jpms-providing-modules`) so the fixtures stop depending on the super-POM's jar-plugin version.
Verified locally under Maven 3.10.0-rc-1: `Surefire1733JUnit4IT`, `Surefire1733TestngIT`, `Surefire2190JUnit4IT`, `Surefire1993JpmsProvidingModulesIT` all green, fixture logs confirm `maven-jar-plugin:3.5.1:jar` executed. The windows-latest jdk-11 cell (currently red on #3392/#3395 for this unrelated reason) should turn green with this change.
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pin maven-jar-plugin 3.5.1 in modular IT fixtures [maven-surefire]
Posted by "ascheman (via GitHub)" <gi...@apache.org>.
ascheman merged PR #3398:
URL: https://github.com/apache/maven-surefire/pull/3398
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pin maven-jar-plugin 3.5.1 in modular IT fixtures [maven-surefire]
Posted by "ascheman (via GitHub)" <gi...@apache.org>.
ascheman commented on code in PR #3398:
URL: https://github.com/apache/maven-surefire/pull/3398#discussion_r3636551839
##########
surefire-its/src/test/resources/surefire-1993-jpms-providing-modules/pom.xml:
##########
@@ -93,6 +93,14 @@
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <!-- explicit 3.5.1: the Maven 3.10.0(-rc-1) super-POM pins 3.5.0, which
+ breaks modular JARs on Windows with JDK < 14 (plexus-archiver 4.10.4
+ NPE), see https://github.com/apache/maven-jar-plugin/issues/555 -->
+ <version>3.5.1</version>
+ </plugin>
Review Comment:
The `<pluginManagement>` entry does apply to the default-bound `jar:jar` executions of the child modules: project-level pluginManagement takes precedence over the super-POM's. Empirically confirmed in the fixture build log of `Surefire1993JpmsProvidingModulesIT` (Maven 3.10.0-rc-1): `--- jar:3.5.1:jar (default-jar) @ studentservice-provider ---` and `--- jar:3.5.1:jar (default-jar) @ application ---`. The now-green windows-jdk11 CI cell of this PR confirms it end-to-end — that cell fails with an NPE exactly when a modular fixture still uses jar-plugin 3.5.0.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pin maven-jar-plugin 3.5.1 in modular IT fixtures [maven-surefire]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #3398:
URL: https://github.com/apache/maven-surefire/pull/3398#discussion_r3635957009
##########
surefire-its/src/test/resources/surefire-1993-jpms-providing-modules/pom.xml:
##########
@@ -93,6 +93,14 @@
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <!-- explicit 3.5.1: the Maven 3.10.0(-rc-1) super-POM pins 3.5.0, which
+ breaks modular JARs on Windows with JDK < 14 (plexus-archiver 4.10.4
+ NPE), see https://github.com/apache/maven-jar-plugin/issues/555 -->
+ <version>3.5.1</version>
+ </plugin>
Review Comment:
In this multi-module fixture, the maven-jar-plugin version is only set in <pluginManagement>. The child modules (studentservice, studentservice-provider, application) do not declare maven-jar-plugin in their <build><plugins>, so this management entry won’t override the super-POM’s default-bound jar plugin version during packaging. As a result, the build can still pick up 3.5.0 on Maven 3.10.0(-rc-1) and keep the Windows/JDK<14 NPE.
To reliably pin the version for the modules’ default jar executions, declare maven-jar-plugin (with the version) under <build><plugins> in the parent so it is inherited by the modules (and remove it from pluginManagement).
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pin maven-jar-plugin 3.5.1 in modular IT fixtures [maven-surefire]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3398:
URL: https://github.com/apache/maven-surefire/pull/3398#issuecomment-5069147885
@ascheman Please assign appropriate label to PR according to the type of change.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org