gnodet-bot commented on code in PR #14005:
URL: https://github.com/apache/maven/pull/14005#discussion_r4575080349
##########
its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java:
##########
@@ -169,10 +169,10 @@ protected Verifier newVerifier(Path basedir, String
settings, boolean createDotM
}
}
- // auto set source+target to lowest reasonable java version
- verifier.getSystemProperties().put("maven.compiler.source", "8");
- verifier.getSystemProperties().put("maven.compiler.target", "8");
- verifier.getSystemProperties().put("maven.compiler.release", "8");
+ // Maven 4 requires JDK 17; use 17 as the baseline for IT-compiled
projects.
Review Comment:
⚠️ **Scope creep:** Bumping the IT compiler baseline from Java 8 → 17 is
unrelated to `DependencyScope` Javadoc (MNG-8752). This change triggers a
cascade of `pom.xml` bumps across many IT fixtures and four
`maven.compiler.release=8` workaround overrides in
`MavenITmng5530MojoExecutionScopeTest`. Please submit the IT harness upgrade as
a separate PR.
##########
its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5530MojoExecutionScopeTest.java:
##########
@@ -37,6 +37,7 @@ public void testCopyfiles() throws Exception {
// install the test plugin
verifier = newVerifier(pluginDir);
+ verifier.getSystemProperties().put("maven.compiler.release", "8");
Review Comment:
🔧 **Workaround smell:** This `release=8` override exists to work around the
global baseline bump in `AbstractMavenIntegrationTestCase`. If the baseline is
being raised to 17, the fixture should be adapted to compile under 17 rather
than individually overridden. Repeating this pattern for each affected test
will accumulate tech debt.
##########
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##########
@@ -102,6 +102,10 @@ public enum DependencyScope {
* by the JDK or the runtime environment/container. Dependencies in this
scope are available on
* the main compile, test compile, and test runtime classpaths, but not on
the main runtime
* classpath. Dependencies in this scope are not transitive to downstream
projects.
+ * <p>
+ * <b>Transitive behavior:</b> Its transitive {@code compile} and {@code
runtime} dependencies
+ * become {@code provided}, while its transitive {@code provided} and
{@code test} dependencies
+ * are omitted.
Review Comment:
⚠️ **Duplication:** The class-level Javadoc (added in PR #13267) already
states that `PROVIDED` dependencies are not transitive to downstream projects.
This constant-level paragraph introduces a maintenance split — please either
add equivalent precision to the class Javadoc, or remove the now-redundant
clause at the class level.
--
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]