feat: Support toolchains for compilation, GroovyDoc, and stub generation#349
Merged
keeganwitt merged 2 commits intomasterfrom Jan 14, 2026
Merged
feat: Support toolchains for compilation, GroovyDoc, and stub generation#349keeganwitt merged 2 commits intomasterfrom
keeganwitt merged 2 commits intomasterfrom
Conversation
c8dcd4a to
80551c0
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for Maven toolchains to enable forked execution of Groovy compilation, stub generation, and GroovyDoc generation. This allows users to compile with different JDK versions than the one running Maven.
Changes:
- Extracted compilation logic into new
GroovyCompilerandForkedGroovyCompilerclasses to support both in-process and forked execution - Added toolchain manager integration to AbstractCompileMojo, AbstractGenerateStubsMojo, and AbstractGroovyDocMojo
- Created configuration model classes (GroovyCompileConfiguration, GroovyStubConfiguration, GroovyDocConfiguration) for serializing compilation settings to forked processes
- Added integration tests for forked compilation, stub generation, and GroovyDoc
Reviewed changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/org/codehaus/gmavenplus/util/GroovyCompiler.java | New utility class containing refactored compilation logic supporting both in-process and forked execution |
| src/main/java/org/codehaus/gmavenplus/util/ForkedGroovyCompiler.java | New main class for forked process execution |
| src/main/java/org/codehaus/gmavenplus/mojo/AbstractCompileMojo.java | Refactored to use GroovyCompiler and support toolchains |
| src/main/java/org/codehaus/gmavenplus/mojo/AbstractGenerateStubsMojo.java | Refactored to use GroovyCompiler and support toolchains |
| src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java | Refactored to use GroovyCompiler and support toolchains |
| src/main/java/org/codehaus/gmavenplus/model/* | New configuration classes for serializing compilation settings |
| src/test/java/org/codehaus/gmavenplus/util/GroovyCompilerTest.java | New test class for GroovyCompiler |
| src/it/forked* | Integration tests for forked execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #43