arimu1 opened a new pull request, #1125:
URL: https://github.com/apache/maven-compiler-plugin/pull/1125
## Summary
- Fix spurious `[WARNING] I/O error reading dependency state:
…/target/classes` during `testCompile` on projects with no `src/main/java`
(tests-only modules).
- Missing classpath/module-path entries are treated like empty directories
when persisting dependency state, so incremental `testCompile` stays stable
without false "changed dependency" rebuilds.
- Adds `DependencyStateTest` coverage and invoker IT
`MCOMPILER-1124_test-only-testcompile`.
Fixes #1124
## Root cause
Since 3.16.0 (#1102), dependency state scanning walks test classpath
elements. Tests-only projects still list `${project.build.outputDirectory}` on
the classpath even when that directory was never created. A missing path was
handled as a regular file read failure, which logged a warning and stored an
`unreadable` fingerprint.
## Test plan
- [x] `mvn -Dtest=DependencyStateTest test`
- [x] `mvn -Prun-its verify
-Dinvoker.test=MCOMPILER-1124_test-only-testcompile -DskipTests`
- [x] Manual reproducer (`lprimak/maven-test-compiler-reproducer`) with
`compiler.plugin.version=3.16.1-SNAPSHOT`: no dependency-state warning on
`clean test-compile` / `test-compile`
- [ ] I hereby declare this contribution to be licenced under the [Apache
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file 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]