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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]