gnodet opened a new pull request, #1096: URL: https://github.com/apache/maven-compiler-plugin/pull/1096
## Summary - Integrate the Maven 4 BuildContext API into the compiler plugin to signal `markSkipExecution()` when compilation is skipped - Covers three skip paths: `CompilerMojo` (when `skipMain` is true), `TestCompilerMojo` (when `skip` is true), and `AbstractCompilerMojo` (when `applyIncrementalBuild()` returns false) - Enables downstream mojos (e.g., jar plugin) to detect that the compiler was skipped and react accordingly ## Details This is an experimental branch that depends on: - https://github.com/apache/maven/pull/12576 (Maven 4 BuildContext API — `4.1.0-SNAPSHOT`) ### Changes - **`AbstractCompilerMojo.java`**: Added `@Inject BuildContext buildContext` field, signals `markSkipExecution()` when `applyIncrementalBuild()` returns false (nothing to compile) - **`CompilerMojo.java`**: Added `markSkipExecution()` when `skipMain` is true - **`TestCompilerMojo.java`**: Added `markSkipExecution()` when `skip` is true - **`CompilerMojoTestCase.java`**: Updated test imports to new `org.apache.maven.testing.plugin` package, added `@Provides` methods for `BuildContext` and `PathMatcherFactory` - **`pom.xml`**: Bumped `mavenVersion` to `4.1.0-SNAPSHOT` ## Test plan - [x] All existing tests pass (16/16) - [ ] Integration testing with a multi-module project to verify skip signaling 🤖 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
