Skip to content

Commit 0848845

Browse files
committed
groovy-eclipse-batch 3.0.17-03 and groovy-eclipse-compiler 3.9.0
1 parent 063eb38 commit 0848845

File tree

13 files changed

+84
-74
lines changed

13 files changed

+84
-74
lines changed

extras/groovy-eclipse-batch-builder/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# version numbers
2-
version3.0=3.0.17-02
2+
version3.0=3.0.17-03
33
version4.0=4.0.12-02
44

55
# uncomment to do a particular build -- only one should be uncommented at a time

extras/groovy-eclipse-compiler-tests/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<groovy.xx.version>4.0.12-02</groovy.xx.version>
1515
<!-- maven-compiler versions to use for tests: -->
1616
<maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>
17-
<maven-compiler-adapter.version>3.8.0</maven-compiler-adapter.version>
17+
<maven-compiler-adapter.version>3.9.0</maven-compiler-adapter.version>
1818

1919
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2020
</properties>

extras/groovy-eclipse-compiler/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>org.codehaus.groovy</groupId>
55
<artifactId>groovy-eclipse-compiler</artifactId>
6-
<version>3.8.0-SNAPSHOT</version>
6+
<version>3.9.0-SNAPSHOT</version>
77
<packaging>maven-plugin</packaging>
88

99
<name>Groovy-Eclipse Compiler Plugin</name>
@@ -97,7 +97,7 @@
9797
<plugin>
9898
<groupId>org.apache.maven.plugins</groupId>
9999
<artifactId>maven-enforcer-plugin</artifactId>
100-
<version>3.1.0</version>
100+
<version>3.3.0</version>
101101
<executions>
102102
<execution>
103103
<id>enforce-versions</id>
@@ -121,7 +121,7 @@
121121
<plugin>
122122
<groupId>org.apache.maven.plugins</groupId>
123123
<artifactId>maven-javadoc-plugin</artifactId>
124-
<version>3.4.1</version>
124+
<version>3.5.0</version>
125125
<executions>
126126
<execution>
127127
<id>attach-javadocs</id>

extras/groovy-eclipse-compiler/src/main/java/org/codehaus/groovy/eclipse/compiler/AddGroovySourceFolders.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

extras/groovy-eclipse-compiler/src/main/java/org/codehaus/groovy/eclipse/compiler/GroovyEclipseCompiler.java

+27-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@
3636
import java.util.List;
3737
import java.util.Map;
3838
import java.util.Set;
39+
import java.util.StringJoiner;
3940
import java.util.TreeSet;
4041
import java.util.concurrent.TimeUnit;
4142
import java.util.regex.Matcher;
@@ -264,6 +265,8 @@ public String put(String k, String v) {
264265
} else {
265266
args.put("-g", null);
266267
}
268+
} else if (config.isOptimize()) {
269+
args.put("-O", null);
267270
}
268271

269272
if (isNotBlank(config.getSourceEncoding())) {
@@ -273,6 +276,12 @@ public String put(String k, String v) {
273276
String release = config.getReleaseVersion();
274277
if (isNotBlank(release)) {
275278
args.put("--release", release.trim());
279+
if (!config.isFork()) { // check tycho useJDK
280+
String javaHome = config.getCustomCompilerArgumentsAsMap().get("use.java.home");
281+
if (isNotBlank(javaHome)) {
282+
args.put("--system", javaHome.trim());
283+
}
284+
}
276285
} else {
277286
String source = config.getSourceVersion();
278287
if (isNotBlank(source)) {
@@ -287,6 +296,7 @@ public String put(String k, String v) {
287296

288297
if (config.isShowDeprecation()) {
289298
args.put("-deprecation", null);
299+
config.setShowWarnings(true);
290300
}
291301
if (config.isFailOnWarning()) {
292302
args.put("-failOnWarning", null);
@@ -305,38 +315,34 @@ public String put(String k, String v) {
305315
}
306316

307317
if (config.getAnnotationProcessors() != null) {
308-
StringBuilder processor = new StringBuilder();
318+
StringJoiner processor = new StringJoiner(",");
309319
for (String item : config.getAnnotationProcessors()) {
310320
if (isNotBlank(item)) {
311-
processor.append(item.trim()).append(',');
321+
processor.add(item.trim());
312322
}
313323
}
314324
if (processor.length() > 0) {
315-
// remove the trailing comma
316-
processor.setLength(processor.length() - 1);
317325
args.put("-processor", processor.toString());
318326
}
319327
}
320328

321329
if (config.getProcessorPathEntries() != null) {
322-
StringBuilder processorpath = new StringBuilder();
330+
StringJoiner processorpath = new StringJoiner(";");
323331
for (String item : config.getProcessorPathEntries()) {
324332
if (isNotBlank(item)) {
325-
processorpath.append(item.trim()).append(';');
333+
processorpath.add(item.trim());
326334
}
327335
}
328336
if (processorpath.length() > 0) {
329-
// remove the trailing semicolon
330-
processorpath.setLength(processorpath.length() - 1);
331337
args.put("-processorpath", processorpath.toString());
332338
}
333339
}
334340

335341
String prev = null;
336-
for (Map.Entry<String, String> entry : config.getCustomCompilerArgumentsAsMap().entrySet()) {
342+
for (Map.Entry<String, String> entry : config.getCustomCompilerArgumentsEntries()) {
337343
String key = entry.getKey();
338344
if (key.startsWith("-")) {
339-
if ("-javaAgentClass".equals(key)) {
345+
if (key.equals("-javaAgentClass")) {
340346
setJavaAgentClass(entry.getValue());
341347
} else if (!key.startsWith("-J")) {
342348
args.put(key, entry.getValue());
@@ -347,7 +353,7 @@ public String put(String k, String v) {
347353
} else {
348354
if (prev != null && entry.getValue() == null) {
349355
args.put(prev, key);
350-
} else if (!"org.osgi.framework.system.packages".equals(key)) { // GRECLIPSE-1418: ignore the system packages option
356+
} else if (!key.startsWith("@") && !key.equals("use.java.home") && !key.equals("org.osgi.framework.system.packages")) { // GRECLIPSE-1418: ignore system packages
351357
args.put("-" + key, entry.getValue());
352358
}
353359
prev = null;
@@ -593,14 +599,18 @@ private String getJavaExecutable(final CompilerConfiguration config) {
593599
return executable;
594600
}
595601

596-
Toolchain jdkToolchain = toolchainManager.getToolchainFromBuildContext("jdk", session);
597-
if (jdkToolchain != null) executable = jdkToolchain.findTool("java");
598-
if (isNotBlank(executable)) {
599-
return executable;
602+
String javaHome = config.getCustomCompilerArgumentsAsMap().get("use.java.home");
603+
if (isBlank(javaHome)) {
604+
javaHome = System.getProperty("java.home"); // fallback to current java home
605+
606+
Toolchain jdkToolchain = toolchainManager.getToolchainFromBuildContext("jdk", session);
607+
if (jdkToolchain != null) executable = jdkToolchain.findTool("java");
608+
if (isNotBlank(executable)) {
609+
return executable;
610+
}
600611
}
601612

602613
String javaCommand = "java" + (Os.isFamily(Os.FAMILY_WINDOWS) ? ".exe" : "");
603-
String javaHome = System.getProperty("java.home");
604614
File javaPath;
605615
if (Os.isName("AIX")) {
606616
javaPath = new File(javaHome + File.separator + ".." + File.separator + "sh", javaCommand);

extras/groovy-eclipse-compiler/src/main/java/org/codehaus/groovy/eclipse/compiler/InternalCompiler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

extras/groovy-eclipse-compiler/src/main/resources/META-INF/plexus/components.xml

+41-41
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@
2121
org.codehaus.groovy:groovy-eclipse-compiler:add-groovy-build-paths
2222
</initialize>
2323
<process-resources>
24-
org.apache.maven.plugins:maven-resources-plugin:2.6:resources
24+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources
2525
</process-resources>
2626
<compile>
27-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile
27+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
2828
</compile>
2929
<process-test-resources>
30-
org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
30+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:testResources
3131
</process-test-resources>
3232
<test-compile>
33-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:testCompile
33+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
3434
</test-compile>
3535
<test>
36-
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
36+
org.apache.maven.plugins:maven-surefire-plugin:3.1.0:test
3737
</test>
3838
<package>
39-
org.apache.maven.plugins:maven-jar-plugin:2.4:jar
39+
org.apache.maven.plugins:maven-jar-plugin:3.3.0:jar
4040
</package>
4141
<install>
42-
org.apache.maven.plugins:maven-install-plugin:2.4:install
42+
org.apache.maven.plugins:maven-install-plugin:3.1.1:install
4343
</install>
4444
<deploy>
45-
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
45+
org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy
4646
</deploy>
4747
</phases>
4848
</lifecycle>
@@ -62,28 +62,28 @@
6262
org.codehaus.groovy:groovy-eclipse-compiler:add-groovy-build-paths
6363
</initialize>
6464
<process-resources>
65-
org.apache.maven.plugins:maven-resources-plugin:2.6:resources
65+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources
6666
</process-resources>
6767
<compile>
68-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile
68+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
6969
</compile>
7070
<process-test-resources>
71-
org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
71+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:testResources
7272
</process-test-resources>
7373
<test-compile>
74-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:testCompile
74+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
7575
</test-compile>
7676
<test>
77-
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
77+
org.apache.maven.plugins:maven-surefire-plugin:3.1.0:test
7878
</test>
7979
<package>
80-
org.apache.maven.plugins:maven-war-plugin:2.2:war
80+
org.apache.maven.plugins:maven-war-plugin:3.3.2:war
8181
</package>
8282
<install>
83-
org.apache.maven.plugins:maven-install-plugin:2.4:install
83+
org.apache.maven.plugins:maven-install-plugin:3.1.1:install
8484
</install>
8585
<deploy>
86-
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
86+
org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy
8787
</deploy>
8888
</phases>
8989
</lifecycle>
@@ -103,28 +103,28 @@
103103
org.codehaus.groovy:groovy-eclipse-compiler:add-groovy-build-paths
104104
</initialize>
105105
<process-resources>
106-
org.apache.maven.plugins:maven-resources-plugin:2.6:resources
106+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources
107107
</process-resources>
108108
<compile>
109-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile
109+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
110110
</compile>
111111
<process-test-resources>
112-
org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
112+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:testResources
113113
</process-test-resources>
114114
<test-compile>
115-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:testCompile
115+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
116116
</test-compile>
117117
<test>
118-
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
118+
org.apache.maven.plugins:maven-surefire-plugin:3.1.0:test
119119
</test>
120120
<package>
121-
org.apache.maven.plugins:maven-rar-plugin:2.2:rar
121+
org.apache.maven.plugins:maven-rar-plugin:3.0.0:rar
122122
</package>
123123
<install>
124-
org.apache.maven.plugins:maven-install-plugin:2.4:install
124+
org.apache.maven.plugins:maven-install-plugin:3.1.1:install
125125
</install>
126126
<deploy>
127-
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
127+
org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy
128128
</deploy>
129129
</phases>
130130
</lifecycle>
@@ -144,28 +144,28 @@
144144
org.codehaus.groovy:groovy-eclipse-compiler:add-groovy-build-paths
145145
</initialize>
146146
<process-resources>
147-
org.apache.maven.plugins:maven-resources-plugin:2.6:resources
147+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources
148148
</process-resources>
149149
<compile>
150-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile
150+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
151151
</compile>
152152
<process-test-resources>
153-
org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
153+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:testResources
154154
</process-test-resources>
155155
<test-compile>
156-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:testCompile
156+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
157157
</test-compile>
158158
<test>
159-
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
159+
org.apache.maven.plugins:maven-surefire-plugin:3.1.0:test
160160
</test>
161161
<package>
162-
org.apache.maven.plugins:maven-ejb-plugin:2.3:ejb
162+
org.apache.maven.plugins:maven-ejb-plugin:3.2.1:ejb
163163
</package>
164164
<install>
165-
org.apache.maven.plugins:maven-install-plugin:2.4:install
165+
org.apache.maven.plugins:maven-install-plugin:3.1.1:install
166166
</install>
167167
<deploy>
168-
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
168+
org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy
169169
</deploy>
170170
</phases>
171171
</lifecycle>
@@ -185,32 +185,32 @@
185185
org.codehaus.groovy:groovy-eclipse-compiler:add-groovy-build-paths
186186
</initialize>
187187
<process-resources>
188-
org.apache.maven.plugins:maven-resources-plugin:2.6:resources
188+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources
189189
</process-resources>
190190
<compile>
191-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile
191+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
192192
</compile>
193193
<process-classes>
194194
org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor
195195
</process-classes>
196196
<process-test-resources>
197-
org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
197+
org.apache.maven.plugins:maven-resources-plugin:3.3.1:testResources
198198
</process-test-resources>
199199
<test-compile>
200-
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:testCompile
200+
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
201201
</test-compile>
202202
<test>
203-
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
203+
org.apache.maven.plugins:maven-surefire-plugin:3.1.0:test
204204
</test>
205205
<package>
206-
org.apache.maven.plugins:maven-jar-plugin:2.4:jar,
207-
org.apache.maven.plugins:maven-plugin-plugin:3.2:addPluginArtifactMetadata
206+
org.apache.maven.plugins:maven-jar-plugin:3.3.0:jar,
207+
org.apache.maven.plugins:maven-plugin-plugin:3.8.2:addPluginArtifactMetadata
208208
</package>
209209
<install>
210-
org.apache.maven.plugins:maven-install-plugin:2.4:install
210+
org.apache.maven.plugins:maven-install-plugin:3.1.1:install
211211
</install>
212212
<deploy>
213-
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
213+
org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy
214214
</deploy>
215215
</phases>
216216
</lifecycle>

extras/groovy-eclipse-maven-tests/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@
6767
<dependency>
6868
<groupId>org.codehaus.groovy</groupId>
6969
<artifactId>groovy-eclipse-compiler</artifactId>
70-
<version>3.8.0</version>
70+
<version>3.9.0</version>
7171
</dependency>
7272
<dependency>
7373
<groupId>org.codehaus.groovy</groupId>
7474
<artifactId>groovy-eclipse-batch</artifactId>
75-
<version>3.0.17-01</version>
75+
<version>3.0.17-03</version>
7676
</dependency>
7777
</dependencies>
7878
</plugin>

extras/groovy-eclipse-quickstart/src/main/resources/archetype-resources/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
<dependency>
6060
<groupId>org.codehaus.groovy</groupId>
6161
<artifactId>groovy-eclipse-compiler</artifactId>
62-
<version>3.8.0</version>
62+
<version>3.9.0</version>
6363
</dependency>
6464
<dependency>
6565
<groupId>org.codehaus.groovy</groupId>
6666
<artifactId>groovy-eclipse-batch</artifactId>
67-
<version>3.0.17-02</version>
67+
<version>3.0.17-03</version>
6868
</dependency>
6969
</dependencies>
7070
</plugin>

0 commit comments

Comments
 (0)