Skip to content

GROOVY-11871: Support Maven Resolver based version of Grapes#2140

Merged
paulk-asert merged 1 commit intoapache:masterfrom
paulk-asert:grapeMaven
Mar 25, 2026
Merged

GROOVY-11871: Support Maven Resolver based version of Grapes#2140
paulk-asert merged 1 commit intoapache:masterfrom
paulk-asert:grapeMaven

Conversation

@paulk-asert
Copy link
Copy Markdown
Contributor

@paulk-asert paulk-asert commented Jan 13, 2025

Provide an Apache Maven Resolver alternative backend implementation for Groovy Grapes.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 8, 2026

Codecov Report

❌ Patch coverage is 9.73783% with 482 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.4334%. Comparing base (b37141f) to head (ba382d4).

Files with missing lines Patch % Lines
...c/main/groovy/groovy/grape/maven/GrapeMaven.groovy 0.0000% 345 Missing ⚠️
src/main/java/groovy/grape/Grape.java 30.9091% 29 Missing and 9 partials ⚠️
...y/src/main/groovy/groovy/grape/ivy/GrapeIvy.groovy 12.8205% 34 Missing ⚠️
src/main/groovy/groovy/grape/GrapeUtil.groovy 57.1429% 13 Missing and 8 partials ⚠️
.../groovy/org/codehaus/groovy/tools/GrapeMain.groovy 0.0000% 21 Missing ⚠️
...groovy/groovy/console/ui/ConsoleMavenPlugin.groovy 0.0000% 15 Missing ⚠️
...e/src/main/groovy/groovy/console/ui/Console.groovy 0.0000% 7 Missing ⚠️
src/main/java/groovy/grape/GrapeEngine.java 0.0000% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #2140        +/-   ##
==================================================
- Coverage     66.6787%   66.4334%   -0.2453%     
- Complexity      29858      29861         +3     
==================================================
  Files            1382       1386         +4     
  Lines          116145     116595       +450     
  Branches        20481      20631       +150     
==================================================
+ Hits            77444      77458        +14     
- Misses          32358      32796       +438     
+ Partials         6343       6341         -2     
Files with missing lines Coverage Δ
...ava/groovy/grape/GrabAnnotationTransformation.java 47.0430% <100.0000%> (+0.2863%) ⬆️
...-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy 95.0000% <ø> (ø)
src/main/java/groovy/grape/GrapeEngine.java 0.0000% <0.0000%> (ø)
...e/src/main/groovy/groovy/console/ui/Console.groovy 0.0000% <0.0000%> (ø)
...groovy/groovy/console/ui/ConsoleMavenPlugin.groovy 0.0000% <0.0000%> (ø)
src/main/groovy/groovy/grape/GrapeUtil.groovy 57.1429% <57.1429%> (ø)
.../groovy/org/codehaus/groovy/tools/GrapeMain.groovy 0.0000% <0.0000%> (ø)
...y/src/main/groovy/groovy/grape/ivy/GrapeIvy.groovy 31.7073% <12.8205%> (ø)
src/main/java/groovy/grape/Grape.java 25.4098% <30.9091%> (-2.9852%) ⬇️
...c/main/groovy/groovy/grape/maven/GrapeMaven.groovy 0.0000% <0.0000%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@paulk-asert paulk-asert changed the title early draft GROOVY-11871: Support Maven Resolver based version of Grapes Mar 9, 2026
@paulk-asert paulk-asert marked this pull request as ready for review March 9, 2026 08:37
@daniellansun daniellansun requested a review from Copilot March 10, 2026 01:22

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@paulk-asert paulk-asert force-pushed the grapeMaven branch 2 times, most recently from 89c2a9b to 6537392 Compare March 15, 2026 22:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 34 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/main/groovy/groovy/grape/GrapeUtil.groovy Outdated
Comment thread subprojects/groovy-xml/src/spec/test/StaxBuilderTest.groovy
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 37 out of 39 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +34 to +37
* def pretty= writer.toString()
* .replaceAll(/<\?xml[^>]*>/, '') // remove XML declaration
* assert pretty in ['<root1 a="5" b="7"><elem1>hello1</elem1><elem2>hello2</elem2><elem3 x="7"></elem3></root1>',
* '<root1 a="5" b="7"><elem1>hello1</elem1><elem2>hello2</elem2><elem3 x="7"/></root1>']
Comment on lines +379 to +392
} catch (ReflectiveOperationException ignore) {
if (DEBUG_GRAPE) {
System.err.println "Ignoring attempt to load ConsoleIvyPlugin: ${ignore.message}"
}
}

// listen for Maven resolver events if the Maven console plugin is on the classpath
try {
def mavenPluginClass = Class.forName('groovy.console.ui.ConsoleMavenPlugin')
mavenPluginClass.getConstructor().newInstance().addListener(this)
} catch (ReflectiveOperationException ignore) {
if (DEBUG_GRAPE) {
System.err.println "Ignoring attempt to load ConsoleMavenPlugin: ${ignore.message}"
}
Comment on lines +26 to +34
def originalErr = System.err
def errBytes = new ByteArrayOutputStream()
try {
System.setErr(new PrintStream(errBytes, true, 'UTF-8'))
action.call()
return errBytes.toString('UTF-8')
} finally {
System.setErr(originalErr)
}
Comment on lines +35 to +37
def pretty= writer.toString()
.replaceAll(/<\?xml[^>]*>/, '') // remove XML declaration
assert pretty == '<root attribute="1"><elem1>hello</elem1><elem2>world</elem2></root>'
@paulk-asert paulk-asert force-pushed the grapeMaven branch 8 times, most recently from 01caa5e to 74bd2f2 Compare March 23, 2026 23:45
@paulk-asert paulk-asert merged commit 182e9d7 into apache:master Mar 25, 2026
23 checks passed
@paulk-asert paulk-asert deleted the grapeMaven branch March 25, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants