Skip to content

Commit e8cfa59

Browse files
fix(build): configure GMavenPlus 4.3.0 to detect Groovy in test scope (liquibase#7539)
* fix(build): configure GMavenPlus 4.3.0 to detect Groovy in test scope GMavenPlus 4.3.0 introduced stricter Groovy version detection that fails when Groovy is only available in test scope. This adds Groovy as a plugin dependency and sets includeClasspath to PROJECT_AND_PLUGIN so the plugin can detect Groovy while keeping it in test scope for the project. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(build): scope GMavenPlus compile goal to module with main Groovy sources GMavenPlus 4.3.0 fails when the compile goal runs on modules where Groovy is only in test scope. Instead of using workarounds, this properly scopes the goals: - Parent POM: only test-related goals (compileTests, removeTestStubs) - liquibase-extension-testing: adds compile and removeStubs goals since this is the only module with main Groovy sources Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 529b15b commit e8cfa59

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

liquibase-extension-testing/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,20 @@
112112

113113
<build>
114114
<plugins>
115+
<!-- This module has main Groovy sources, so we need compile goal (not just compileTests) -->
116+
<plugin>
117+
<groupId>org.codehaus.gmavenplus</groupId>
118+
<artifactId>gmavenplus-plugin</artifactId>
119+
<executions>
120+
<execution>
121+
<id>groovy-compile</id>
122+
<goals>
123+
<goal>compile</goal>
124+
<goal>removeStubs</goal>
125+
</goals>
126+
</execution>
127+
</executions>
128+
</plugin>
115129
<plugin>
116130
<groupId>org.apache.maven.plugins</groupId>
117131
<artifactId>maven-shade-plugin</artifactId>

pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,7 @@
381381
<goals>
382382
<goal>addSources</goal>
383383
<goal>addTestSources</goal>
384-
<goal>compile</goal>
385384
<goal>compileTests</goal>
386-
<goal>removeStubs</goal>
387385
<goal>removeTestStubs</goal>
388386
</goals>
389387
</execution>

0 commit comments

Comments
 (0)