Skip to content

Commit 2cde5fd

Browse files
authored
change to groovy to groupId org.apache.groovy and bump version to 4.0.6 (#154)
Signed-off-by: Olivier Lamy <[email protected]>
1 parent d8a4871 commit 2cde5fd

File tree

14 files changed

+68
-44
lines changed

14 files changed

+68
-44
lines changed

.github/workflows/maven-verify.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ jobs:
2525
build:
2626
name: Verify
2727
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3
28+
with:
29+
maven-args: '-D"invoker.streamLogsOnFailures" -U'
30+
# put this back when 3.4.0 with jdk19 support has been released
31+
#jdk-matrix: '[ "8", "11", "17", "19"]'
32+
# verify-fail-fast: false

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
* under the License.
1818
*/
1919

20-
asfMavenTlpPlgnBuild()
20+
// put 19 back when 3.4.0 with jdk19 support has been released
21+
asfMavenTlpPlgnBuild(jdks:[ "8", "11", "17"])

pom.xml

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ under the License.
3030
</parent>
3131

3232
<artifactId>maven-invoker-plugin</artifactId>
33-
<version>3.3.1-SNAPSHOT</version>
33+
<version>3.4.0-SNAPSHOT</version>
3434
<packaging>maven-plugin</packaging>
3535

3636
<name>Apache Maven Invoker Plugin</name>
@@ -70,9 +70,8 @@ under the License.
7070
<beanshell-groupId>org.apache-extras.beanshell</beanshell-groupId>
7171
<beanshell-artifactId>bsh</beanshell-artifactId>
7272
<beanshell-version>2.0b6</beanshell-version>
73-
<groovy-groupId>org.codehaus.groovy</groovy-groupId>
74-
<groovy-version>3.0.12</groovy-version>
7573
<project.build.outputTimestamp>2022-05-25T15:26:55Z</project.build.outputTimestamp>
74+
<groovy-version>4.0.6</groovy-version>
7675
</properties>
7776

7877
<dependencyManagement>
@@ -98,6 +97,13 @@ under the License.
9897
<artifactId>commons-io</artifactId>
9998
<version>2.11.0</version>
10099
</dependency>
100+
<dependency>
101+
<groupId>org.apache.groovy</groupId>
102+
<artifactId>groovy-bom</artifactId>
103+
<version>${groovy-version}</version>
104+
<type>pom</type>
105+
<scope>import</scope>
106+
</dependency>
101107
</dependencies>
102108
</dependencyManagement>
103109

@@ -159,14 +165,7 @@ under the License.
159165
<dependency>
160166
<groupId>org.apache.maven.shared</groupId>
161167
<artifactId>maven-script-interpreter</artifactId>
162-
<version>1.3</version>
163-
<exclusions>
164-
<!-- there's already a direct dependency to groovy -->
165-
<exclusion>
166-
<groupId>org.codehaus.groovy</groupId>
167-
<artifactId>groovy</artifactId>
168-
</exclusion>
169-
</exclusions>
168+
<version>1.4-SNAPSHOT</version>
170169
</dependency>
171170

172171
<dependency>
@@ -189,21 +188,18 @@ under the License.
189188
</dependency>
190189

191190
<dependency>
192-
<groupId>${groovy-groupId}</groupId>
191+
<groupId>org.apache.groovy</groupId>
193192
<artifactId>groovy</artifactId>
194-
<version>${groovy-version}</version>
195193
<scope>runtime</scope>
196194
</dependency>
197195
<dependency>
198-
<groupId>${groovy-groupId}</groupId>
196+
<groupId>org.apache.groovy</groupId>
199197
<artifactId>groovy-json</artifactId>
200-
<version>${groovy-version}</version>
201198
<scope>runtime</scope>
202199
</dependency>
203200
<dependency>
204-
<groupId>${groovy-groupId}</groupId>
201+
<groupId>org.apache.groovy</groupId>
205202
<artifactId>groovy-xml</artifactId>
206-
<version>${groovy-version}</version>
207203
<scope>runtime</scope>
208204
</dependency>
209205

@@ -265,7 +261,6 @@ under the License.
265261
<version>1.7.36</version>
266262
<scope>test</scope>
267263
</dependency>
268-
269264
</dependencies>
270265

271266
<build>
@@ -332,6 +327,29 @@ under the License.
332327
<version>1.0.0</version>
333328
</configuration>
334329
</plugin>
330+
<plugin>
331+
<groupId>org.apache.maven.plugins</groupId>
332+
<artifactId>maven-enforcer-plugin</artifactId>
333+
<executions>
334+
<execution>
335+
<id>ban-org-codehaus-groovy</id>
336+
<goals>
337+
<goal>enforce</goal>
338+
</goals>
339+
<phase>validate</phase>
340+
<configuration>
341+
<rules>
342+
<bannedDependencies>
343+
<excludes>
344+
<exclude>org.codehaus.groovy:*</exclude>
345+
</excludes>
346+
<searchTransitive>true</searchTransitive>
347+
</bannedDependencies>
348+
</rules>
349+
</configuration>
350+
</execution>
351+
</executions>
352+
</plugin>
335353
</plugins>
336354
</build>
337355

src/it/MINVOKER-196_junit_report_file/src/it/project/verify.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* under the License.
1818
*/
1919

20+
import groovy.xml.XmlSlurper
21+
2022
// ensure script context contains localRepositoryPath
2123
assert new File( basedir, "../../../target/it-repo" ).canonicalFile.equals( localRepositoryPath )
2224

src/it/MINVOKER-196_junit_report_file/verify.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19+
import groovy.xml.XmlSlurper
20+
1921
File buildLog = new File( basedir, 'build.log' )
2022
assert buildLog.text.contains( '[INFO] run post-build script verify.groovy' )
2123

src/it/MINVOKER-288-failed-setup-run/verify.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
19+
import groovy.xml.XmlSlurper
2020

2121
File invokerReports = new File( new File(basedir, 'target'), 'invoker-reports-test' )
2222
assert invokerReports.exists()

src/it/MINVOKER-288-failed-setup-verify/verify.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
19+
import groovy.xml.XmlSlurper
2020

2121
File invokerReports = new File( new File(basedir, "target"), 'invoker-reports-test' )
2222
assert invokerReports.exists()

src/it/local-repo-url/src/it/project/postbuild.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* under the License.
1818
*/
1919

20+
import groovy.xml.XmlSlurper
21+
2022
// ensure script context contains localRepositoryPath
2123
assert new File( basedir, "../../../target/it-repo" ).canonicalFile.equals( localRepositoryPath )
2224

src/it/script-classpath-duplicates/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ under the License.
4141
<scope>test</scope>
4242
</dependency>
4343
<dependency>
44-
<groupId>@groovy-groupId@</groupId>
44+
<groupId>org.apache.groovy</groupId>
4545
<artifactId>groovy</artifactId>
4646
<version>@groovy-version@</version>
4747
<type>pom</type>

src/it/script-streamLogs-false/verify.groovy

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ assert beanshellLog.contains('java.lang.OutOfMemoryError: Requested array size e
4040

4141
// groovy failed and no log message
4242
assert !buildLog.contains('[INFO] Output from groovy script')
43-
assert !buildLog.contains('Assertion failed:')
44-
assert !buildLog.contains('assert pom.contains("<modelVersion>9.9.9</modelVersion>")')
45-
assert buildLog.contains('[INFO] org.apache.maven.shared.scriptinterpreter.ScriptEvaluationException: Assertion Error')
43+
assert buildLog.contains('Assertion failed:')
44+
assert buildLog.contains('assert pom.contains("<modelVersion>9.9.9</modelVersion>")')
4645
assert buildLog.contains('[INFO] groovy' + FS + 'pom.xml ................................... FAILED')
4746

4847
assert groovyLog.contains('Output from groovy script')

0 commit comments

Comments
 (0)