Skip to content

Commit c5a389d

Browse files
[MINVOKER-304] Use only common groovy modules - xml, json
- changed dependencies in pom - added documentation about groovy versions
1 parent 8458a98 commit c5a389d

File tree

4 files changed

+95
-25
lines changed

4 files changed

+95
-25
lines changed

pom.xml

+15-24
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ under the License.
7171
<beanshell-artifactId>bsh</beanshell-artifactId>
7272
<beanshell-version>2.0b6</beanshell-version>
7373
<groovy-groupId>org.codehaus.groovy</groovy-groupId>
74-
<groovy-artifactId>groovy-all</groovy-artifactId>
7574
<groovy-version>3.0.10</groovy-version>
7675
<surefire.version>2.22.2</surefire.version>
7776
<project.build.outputTimestamp>2021-02-14T00:04:14Z</project.build.outputTimestamp>
@@ -137,7 +136,7 @@ under the License.
137136
<artifactId>maven-script-interpreter</artifactId>
138137
<version>1.3</version>
139138
<exclusions>
140-
<!-- there's already a direct dependency to groovy-all -->
139+
<!-- there's already a direct dependency to groovy -->
141140
<exclusion>
142141
<groupId>org.codehaus.groovy</groupId>
143142
<artifactId>groovy</artifactId>
@@ -163,32 +162,24 @@ under the License.
163162
<version>${beanshell-version}</version>
164163
<scope>runtime</scope>
165164
</dependency>
165+
166166
<dependency>
167167
<groupId>${groovy-groupId}</groupId>
168-
<artifactId>${groovy-artifactId}</artifactId>
168+
<artifactId>groovy</artifactId>
169+
<version>${groovy-version}</version>
170+
<scope>runtime</scope>
171+
</dependency>
172+
<dependency>
173+
<groupId>${groovy-groupId}</groupId>
174+
<artifactId>groovy-json</artifactId>
175+
<version>${groovy-version}</version>
176+
<scope>runtime</scope>
177+
</dependency>
178+
<dependency>
179+
<groupId>${groovy-groupId}</groupId>
180+
<artifactId>groovy-xml</artifactId>
169181
<version>${groovy-version}</version>
170-
<type>pom</type>
171182
<scope>runtime</scope>
172-
<exclusions>
173-
<exclusion> <!-- pulls in jline with shaded org.fusesource.jansi.Ansi, causing invalid output for M3.5.0- -->
174-
<groupId>org.codehaus.groovy</groupId>
175-
<artifactId>groovy-groovysh</artifactId>
176-
</exclusion>
177-
<!-- MINVOKER-285 - exclude additional tests frameworks -->
178-
<exclusion>
179-
<groupId>org.codehaus.groovy</groupId>
180-
<artifactId>groovy-test</artifactId>
181-
</exclusion>
182-
<exclusion>
183-
<groupId>org.codehaus.groovy</groupId>
184-
<artifactId>groovy-test-junit5</artifactId>
185-
</exclusion>
186-
<exclusion>
187-
<groupId>org.codehaus.groovy</groupId>
188-
<artifactId>groovy-testng</artifactId>
189-
</exclusion>
190-
<!-- /MINVOKER-285 -->
191-
</exclusions>
192183
</dependency>
193184

194185
<dependency>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ under the License.
4242
</dependency>
4343
<dependency>
4444
<groupId>@groovy-groupId@</groupId>
45-
<artifactId>@groovy-artifactId@</artifactId>
45+
<artifactId>groovy</artifactId>
4646
<version>@groovy-version@</version>
4747
<type>pom</type>
4848
<scope>test</scope>

src/site/apt/groovy-version.apt.vm

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
------
2+
Groovy version and extensions
3+
------
4+
Slawomir Jaranowski
5+
------
6+
2022-05-22
7+
------
8+
9+
~~ Licensed to the Apache Software Foundation (ASF) under one
10+
~~ or more contributor license agreements. See the NOTICE file
11+
~~ distributed with this work for additional information
12+
~~ regarding copyright ownership. The ASF licenses this file
13+
~~ to you under the Apache License, Version 2.0 (the
14+
~~ "License"); you may not use this file except in compliance
15+
~~ with the License. You may obtain a copy of the License at
16+
~~
17+
~~ http://www.apache.org/licenses/LICENSE-2.0
18+
~~
19+
~~ Unless required by applicable law or agreed to in writing,
20+
~~ software distributed under the License is distributed on an
21+
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22+
~~ KIND, either express or implied. See the License for the
23+
~~ specific language governing permissions and limitations
24+
~~ under the License.
25+
26+
~~ NOTE: For help with the syntax of this file, see:
27+
~~ http://maven.apache.org/doxia/references/apt-format.html
28+
29+
Groovy version and extensions
30+
31+
<<NOTICE>>: Plugin <<<maven-invoker-plugin>>> in versions older than <<<3.3.0>>> has dependency
32+
on <<<groovy-all>>> artifact from <<<Groovy 2>>>.
33+
34+
Plugin <<<maven-invoker-plugin>>> in version <<<3.3.0>>> has only dependency on <<<Groovy 3>>> core add common extensions:
35+
36+
* <<<org.codehaus.groovy:groovy:3.0.10>>>
37+
38+
* <<<org.codehaus.groovy:groovy-json:3.0.10>>>
39+
40+
* <<<org.codehaus.groovy:groovy-xml:3.0.10>>>
41+
42+
[]
43+
44+
If you need additional <<<Groovy>>> extension in your scripts ( post, pre, setup, ... )
45+
you must add a dependency to plugin definition, eg:
46+
47+
+------------------
48+
<project>
49+
<build>
50+
<plugins>
51+
<plugin>
52+
<artifactId>maven-invoker-plugin</artifactId>
53+
<version>${project.version}</version>
54+
.....
55+
<dependencies>
56+
<dependency>
57+
<groupId>org.codehaus.groovy</groupId>
58+
<artifactId>groovy-yaml</artifactId>
59+
<version>3.0.10</version>
60+
</dependency>
61+
</dependencies>
62+
</plugin>
63+
</plugins>
64+
</build>
65+
</project>
66+
+------------------
67+
68+
<<NOTICE>>: In plugin version <<<3.3.0>>> only <<<Groovy 3>>> extensions can be used.
69+
70+
Groovy 4
71+
72+
Please be noted that in <<<Groovy 4>>> maven <<<groupId>>> was changed
73+
from <<org.codehaus.groovy>> to <<org.apache.groovy>>.
74+
75+
Plugin has dependency on <<<Groovy 3>>> artifacts with old <<<groupId>>>,
76+
what causes that <<<Groovy 4>>> can not by used in scripts.
77+
78+
Next version of <<<maven-invoker-plugin>>> can contains <<<Groovy 4>>> as default.

src/site/site.xml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ under the License.
2727
<item name="Introduction" href="index.html"/>
2828
<item name="Goals" href="plugin-info.html"/>
2929
<item name="Usage" href="usage.html"/>
30+
<item name="Groovy version" href="groovy-version.html"/>
3031
<item name="FAQ" href="faq.html"/>
3132
<!-- According to https://issues.apache.org/jira/browse/MNGSITE-152 -->
3233
<item name="License" href="https://www.apache.org/licenses/"/>

0 commit comments

Comments
 (0)