arimu1 opened a new pull request, #14094:
URL: https://github.com/apache/maven/pull/14094

   Fixes #14004
   
   `DependencyResolver.flatten` keeps a node only when its scope is in 
`PathScope.dependencyScopes()`. The resolution scopes `main-compile`, 
`test-compile`, and `test-runtime` already include `system`, but 
`MAIN_COMPILE`, `TEST_COMPILE`, and `TEST_RUNTIME` omitted 
`DependencyScope.SYSTEM`, so a system-scoped jar was collected and then 
dropped. maven-compiler-plugin 4 builds the compile classpath through this 
resolver, which is why a project that compiles against a system-scoped jar with 
compiler-plugin 3.15.0 fails with `package sys does not exist` on 4.0.0-beta-5.
   
   This adds `DependencyScope.SYSTEM` only to those three path scopes. 
`MAIN_RUNTIME` still excludes system, matching `main-runtime` rather than 
`main-runtimePlusSystem`. System scope remains deprecated (#3356).
   
   `maven-4.0.x` has the same omission. This pull request targets `master` 
only; please backport it to `maven-4.0.x`.
   
   ## Test
   
   JDK 17 (JetBrains Runtime 17.0.14):
   
   ```
   mvn -pl impl/maven-impl -am test -Dtest=DefaultDependencyResolverTest 
-Dsurefire.failIfNoSpecifiedTests=false
   ```
   
   `DefaultDependencyResolverTest`: 7 tests, 0 failures, 0 errors. Upstream 
reactor modules do not contain this test, so `surefire.failIfNoSpecifiedTests` 
was set so those modules do not fail the reactor. The full integration-test 
suite (`mvn -Prun-its verify`) was not run.
   
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [ ] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   
   Made with [Cursor](https://cursor.com)


-- 
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]

Reply via email to