diff --git a/integrationTest.groovy b/integrationTest.groovy index e4af829c9..3d0b22dfd 100644 --- a/integrationTest.groovy +++ b/integrationTest.groovy @@ -6,7 +6,7 @@ import groovy.io.FileType new File(System.getProperty("user.dir")).eachFileMatch FileType.FILES, ~/groovy-.+\.log/, { it.delete() } println "Installing plugin..." -quietlyRunCommand "${mvn()} -B -P nonindy clean install invoker:install" +quietlyRunCommand "${mvn()} -B -P nonindy -Dmaven.test.skip=true -Dinvoker.skip=true clean install invoker:install" // TODO: fix joint compilation failures with Groovy 1.9-beta-1 and 1.9-beta-2 groovyVersions = ["1.5.0", "1.5.1", "1.5.2", "1.5.3", "1.5.4", "1.5.5", "1.5.6", "1.5.7", "1.5.8", "1.6-beta-1", "1.6-beta-2", "1.6-RC-1", "1.6-RC-2", "1.6-RC-3", "1.6.0", "1.6.1", "1.6.2", "1.6.3", "1.6.4", "1.6.5", "1.6.6", "1.6.7", "1.6.8", "1.6.9", @@ -24,26 +24,27 @@ groovyVersions = ["1.5.0", "1.5.1", "1.5.2", "1.5.3", "1.5.4", "1.5.5", "1.5.6", "4.0.0-alpha-1"] for (int i = 0; i < groovyVersions.size(); i++) { def groovyVersion = groovyVersions[i] + System.out.print "Testing Groovy ${groovyVersion}..." - def pom = new File("pom.xml") - pom.write((pom.text =~ /.+/).replaceFirst("${groovyVersion}")) testLabel = groovyVersion os = new FileOutputStream(new File("groovy-${testLabel}.log")) - profile = "${i < groovyVersions.indexOf("2.3.0") ? 'pre2.3-' : ''}nonindy" + profiles = "${i < groovyVersions.indexOf("2.3.0") ? 'pre2.3-' : ''}nonindy" + properties = "-DgroovyVersion=${groovyVersion} -DgroovyGroupId=${i >= groovyVersions.indexOf("4.0.0-alpha-1") ? 'org.apache.groovy' : 'org.codehaus.groovy'}" testVersion() - if (i >= groovyVersions.indexOf("2.0.0-beta-3")) { + + if (i >= groovyVersions.indexOf("2.0.0-beta-3") && i < groovyVersions.indexOf("4.0.0-alpha-1")) { System.out.print "Testing Groovy ${groovyVersion}-indy..." testLabel = "${groovyVersion}-indy" os = new FileOutputStream(new File("groovy-${testLabel}.log")) - profile = "${i < groovyVersions.indexOf("2.3.0") ? 'pre2.3-' : ''}indy" + profiles = "${i < groovyVersions.indexOf("2.3.0") ? 'pre2.3-' : ''}indy" + properties = "-DgroovyVersion=${groovyVersion} -DgroovyGroupId=${i >= groovyVersions.indexOf("4.0.0-alpha-1") ? 'org.apache.groovy' : 'org.codehaus.groovy'}" testVersion() } } -quietlyRunCommand "git checkout pom.xml" quietlyRunCommand "${mvn()} -B clean" void testVersion() { - def exitCode = runCommand "${mvn()} -B -P $profile -Dinvoker.streamLogs=true invoker:run" + def exitCode = runCommand "${mvn()} -B -P ${profiles} -Dinvoker.streamLogs=true ${properties} invoker:run" os.flush() os.close() if (exitCode != 0) { diff --git a/pom.xml b/pom.xml index 4bd005531..758a25c7b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,12 @@ - + 4.0.0 org.codehaus.gmavenplus gmavenplus-plugin maven-plugin - 1.10.2-SNAPSHOT + 1.11.0-SNAPSHOT UTF-8 @@ -23,7 +24,8 @@ 3.6.0 3.2.1 - + + org.codehaus.groovy 3.0.6 @@ -112,21 +114,21 @@ indy - org.codehaus.groovy + ${groovyGroupId} groovy ${groovyVersion} indy test - org.codehaus.groovy + ${groovyGroupId} groovy-ant ${groovyVersion} indy test - org.codehaus.groovy + ${groovyGroupId} groovy-groovydoc ${groovyVersion} indy @@ -151,19 +153,19 @@ nonindy - org.codehaus.groovy + ${groovyGroupId} groovy ${groovyVersion} test - org.codehaus.groovy + ${groovyGroupId} groovy-ant ${groovyVersion} test - org.codehaus.groovy + ${groovyGroupId} groovy-groovydoc ${groovyVersion} test @@ -187,7 +189,7 @@ pre2.3-indy - org.codehaus.groovy + ${groovyGroupId} groovy ${groovyVersion} indy @@ -212,7 +214,7 @@ pre2.3-nonindy - org.codehaus.groovy + ${groovyGroupId} groovy ${groovyVersion} test @@ -450,6 +452,9 @@ ${shortJavaVersion} false + + https://docs.groovy-lang.org/latest/html/api/ + @@ -526,6 +531,9 @@ ${javaVersion} false + + https://docs.groovy-lang.org/latest/html/api/ + diff --git a/src/it/advancedCompile/pom.xml b/src/it/advancedCompile/pom.xml index f69405391..7a8912bcf 100644 --- a/src/it/advancedCompile/pom.xml +++ b/src/it/advancedCompile/pom.xml @@ -31,7 +31,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -41,7 +41,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -50,7 +50,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -60,7 +60,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/advancedExecute/pom.xml b/src/it/advancedExecute/pom.xml index 8ca86b3d1..a8169da31 100644 --- a/src/it/advancedExecute/pom.xml +++ b/src/it/advancedExecute/pom.xml @@ -39,13 +39,13 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy - org.codehaus.groovy + @groovyGroupId@ groovy-ant @groovyVersion@ indy @@ -64,12 +64,12 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ - org.codehaus.groovy + @groovyGroupId@ groovy-ant @groovyVersion@ @@ -87,7 +87,7 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy @@ -106,7 +106,7 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ diff --git a/src/it/advancedGenerateStubs/pom.xml b/src/it/advancedGenerateStubs/pom.xml index 7d58d76a0..f34ce9e72 100644 --- a/src/it/advancedGenerateStubs/pom.xml +++ b/src/it/advancedGenerateStubs/pom.xml @@ -29,7 +29,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -39,7 +39,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -48,7 +48,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -58,7 +58,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/advancedGroovydoc/pom.xml b/src/it/advancedGroovydoc/pom.xml index 782ea47d4..aa2d1fcb7 100644 --- a/src/it/advancedGroovydoc/pom.xml +++ b/src/it/advancedGroovydoc/pom.xml @@ -28,12 +28,12 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc indy @@ -43,11 +43,11 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @@ -56,7 +56,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -66,7 +66,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/astCompile/pom.xml b/src/it/astCompile/pom.xml index a3d72e48c..2ce549a18 100644 --- a/src/it/astCompile/pom.xml +++ b/src/it/astCompile/pom.xml @@ -29,7 +29,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -39,7 +39,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -48,7 +48,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -58,7 +58,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/basicCompile/pom.xml b/src/it/basicCompile/pom.xml index f4ae5ed40..2e5522087 100644 --- a/src/it/basicCompile/pom.xml +++ b/src/it/basicCompile/pom.xml @@ -28,7 +28,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -38,7 +38,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -47,7 +47,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -57,7 +57,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/basicExecute/pom.xml b/src/it/basicExecute/pom.xml index 14a9439eb..8603a64d0 100644 --- a/src/it/basicExecute/pom.xml +++ b/src/it/basicExecute/pom.xml @@ -32,13 +32,13 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy - org.codehaus.groovy + @groovyGroupId@ groovy-ant @groovyVersion@ indy @@ -57,12 +57,12 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ - org.codehaus.groovy + @groovyGroupId@ groovy-ant @groovyVersion@ @@ -80,7 +80,7 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy @@ -99,7 +99,7 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ diff --git a/src/it/basicGenerateStubs/pom.xml b/src/it/basicGenerateStubs/pom.xml index 09ce246d1..5f03918fd 100644 --- a/src/it/basicGenerateStubs/pom.xml +++ b/src/it/basicGenerateStubs/pom.xml @@ -29,7 +29,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -39,7 +39,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -48,7 +48,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -58,7 +58,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/basicGroovydoc/pom.xml b/src/it/basicGroovydoc/pom.xml index 8a0de8959..64535771f 100644 --- a/src/it/basicGroovydoc/pom.xml +++ b/src/it/basicGroovydoc/pom.xml @@ -28,12 +28,12 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc indy @@ -43,11 +43,11 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @@ -56,7 +56,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -66,7 +66,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/basicGroovydocJar/pom.xml b/src/it/basicGroovydocJar/pom.xml index 472be2bbb..431488561 100644 --- a/src/it/basicGroovydocJar/pom.xml +++ b/src/it/basicGroovydocJar/pom.xml @@ -28,17 +28,17 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc indy - org.codehaus.groovy + @groovyGroupId@ groovy-templates indy @@ -48,15 +48,15 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc - org.codehaus.groovy + @groovyGroupId@ groovy-templates @@ -65,7 +65,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -75,7 +75,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/cleanClasspathCompile/pom.xml b/src/it/cleanClasspathCompile/pom.xml index 293683921..ba729c1ae 100644 --- a/src/it/cleanClasspathCompile/pom.xml +++ b/src/it/cleanClasspathCompile/pom.xml @@ -30,7 +30,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -40,7 +40,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -49,7 +49,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -59,7 +59,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/cleanClasspathGenerateStubs/pom.xml b/src/it/cleanClasspathGenerateStubs/pom.xml index 8e34291d9..538fd094c 100644 --- a/src/it/cleanClasspathGenerateStubs/pom.xml +++ b/src/it/cleanClasspathGenerateStubs/pom.xml @@ -30,7 +30,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -40,7 +40,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -49,7 +49,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -59,7 +59,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/configScriptCompile/pom.xml b/src/it/configScriptCompile/pom.xml index b6452f817..4ef2d6a95 100644 --- a/src/it/configScriptCompile/pom.xml +++ b/src/it/configScriptCompile/pom.xml @@ -30,7 +30,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -40,7 +40,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -49,7 +49,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -59,7 +59,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mavenPlugin/mojo/pom.xml b/src/it/mavenPlugin/mojo/pom.xml index 06136ab70..8182acd68 100644 --- a/src/it/mavenPlugin/mojo/pom.xml +++ b/src/it/mavenPlugin/mojo/pom.xml @@ -20,7 +20,7 @@ - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ diff --git a/src/it/mixedCompile/pom.xml b/src/it/mixedCompile/pom.xml index 35ca73eb7..6335b97a6 100644 --- a/src/it/mixedCompile/pom.xml +++ b/src/it/mixedCompile/pom.xml @@ -29,12 +29,12 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-ant indy @@ -44,11 +44,11 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-ant @@ -57,7 +57,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -67,7 +67,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mixedCompile2/pom.xml b/src/it/mixedCompile2/pom.xml index ee8b8b349..7c03ecab0 100644 --- a/src/it/mixedCompile2/pom.xml +++ b/src/it/mixedCompile2/pom.xml @@ -29,12 +29,12 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-ant indy @@ -44,11 +44,11 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-ant @@ -57,7 +57,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -67,7 +67,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mixedCompileCircular/pom.xml b/src/it/mixedCompileCircular/pom.xml index e92a530b8..864a08909 100644 --- a/src/it/mixedCompileCircular/pom.xml +++ b/src/it/mixedCompileCircular/pom.xml @@ -30,7 +30,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -40,7 +40,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -49,7 +49,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -59,7 +59,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mixedCompileMultiModule/groovyModule/pom.xml b/src/it/mixedCompileMultiModule/groovyModule/pom.xml index 3cb51f815..76b0b6da8 100644 --- a/src/it/mixedCompileMultiModule/groovyModule/pom.xml +++ b/src/it/mixedCompileMultiModule/groovyModule/pom.xml @@ -27,12 +27,12 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-ant indy @@ -42,11 +42,11 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-ant @@ -55,7 +55,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -65,7 +65,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mixedCompileMultiModule/javaModule/pom.xml b/src/it/mixedCompileMultiModule/javaModule/pom.xml index fa5f338ce..16e8bd4a5 100644 --- a/src/it/mixedCompileMultiModule/javaModule/pom.xml +++ b/src/it/mixedCompileMultiModule/javaModule/pom.xml @@ -31,7 +31,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -41,7 +41,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -50,7 +50,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -60,7 +60,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mixedCompileMultiModule2/groovyModule/pom.xml b/src/it/mixedCompileMultiModule2/groovyModule/pom.xml index 80aced4fc..35a34f283 100644 --- a/src/it/mixedCompileMultiModule2/groovyModule/pom.xml +++ b/src/it/mixedCompileMultiModule2/groovyModule/pom.xml @@ -31,12 +31,12 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-ant indy @@ -46,11 +46,11 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-ant @@ -59,7 +59,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -69,7 +69,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mixedCompileMultiModule2/javaModule/pom.xml b/src/it/mixedCompileMultiModule2/javaModule/pom.xml index 6c3517ab7..1df791bf8 100644 --- a/src/it/mixedCompileMultiModule2/javaModule/pom.xml +++ b/src/it/mixedCompileMultiModule2/javaModule/pom.xml @@ -27,7 +27,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -37,7 +37,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -46,7 +46,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -56,7 +56,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mixedGroovydoc/pom.xml b/src/it/mixedGroovydoc/pom.xml index 5a66bc758..d3301e488 100644 --- a/src/it/mixedGroovydoc/pom.xml +++ b/src/it/mixedGroovydoc/pom.xml @@ -30,12 +30,12 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc indy @@ -45,11 +45,11 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @@ -58,7 +58,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -68,7 +68,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/mixedGroovydoc2/pom.xml b/src/it/mixedGroovydoc2/pom.xml index 21b3c3268..ebf8a5d7c 100644 --- a/src/it/mixedGroovydoc2/pom.xml +++ b/src/it/mixedGroovydoc2/pom.xml @@ -30,12 +30,12 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc indy @@ -45,11 +45,11 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @@ -58,7 +58,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -68,7 +68,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/parametersCompile/pom.xml b/src/it/parametersCompile/pom.xml index e6e040862..28dc5a4f9 100644 --- a/src/it/parametersCompile/pom.xml +++ b/src/it/parametersCompile/pom.xml @@ -30,7 +30,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -40,7 +40,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -49,7 +49,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -59,7 +59,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/it/pluginAndProjectClasspath/pom.xml b/src/it/pluginAndProjectClasspath/pom.xml index 2f7092486..b8062802a 100644 --- a/src/it/pluginAndProjectClasspath/pom.xml +++ b/src/it/pluginAndProjectClasspath/pom.xml @@ -30,13 +30,13 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy runtime - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc indy runtime @@ -50,13 +50,13 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @groovyVersion@ indy @@ -71,12 +71,12 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy runtime - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc runtime @@ -89,12 +89,12 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @groovyVersion@ @@ -108,7 +108,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy runtime @@ -122,7 +122,7 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy @@ -137,7 +137,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy runtime @@ -150,7 +150,7 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ diff --git a/src/it/pluginClasspath/pom.xml b/src/it/pluginClasspath/pom.xml index f9aa4ff5b..af018069f 100644 --- a/src/it/pluginClasspath/pom.xml +++ b/src/it/pluginClasspath/pom.xml @@ -28,13 +28,13 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy runtime - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc indy runtime @@ -48,13 +48,13 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @groovyVersion@ indy @@ -69,12 +69,12 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy runtime - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc runtime @@ -87,12 +87,12 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @groovyVersion@ @@ -106,7 +106,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy runtime @@ -120,7 +120,7 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy @@ -135,7 +135,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy runtime @@ -148,7 +148,7 @@ gmavenplus-plugin - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ diff --git a/src/it/pom.xml b/src/it/pom.xml index 5f25891ec..6296f5375 100644 --- a/src/it/pom.xml +++ b/src/it/pom.xml @@ -47,25 +47,25 @@ - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy - org.codehaus.groovy + @groovyGroupId@ groovy-ant @groovyVersion@ indy - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @groovyVersion@ indy - org.codehaus.groovy + @groovyGroupId@ groovy-templates @groovyVersion@ indy @@ -91,22 +91,22 @@ - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ - org.codehaus.groovy + @groovyGroupId@ groovy-ant @groovyVersion@ - org.codehaus.groovy + @groovyGroupId@ groovy-groovydoc @groovyVersion@ - org.codehaus.groovy + @groovyGroupId@ groovy-templates @groovyVersion@ @@ -118,7 +118,7 @@ - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ indy @@ -144,7 +144,7 @@ - org.codehaus.groovy + @groovyGroupId@ groovy @groovyVersion@ diff --git a/src/it/shadedGroovy/uberModule/pom.xml b/src/it/shadedGroovy/uberModule/pom.xml index 8f642f484..8600ba31c 100644 --- a/src/it/shadedGroovy/uberModule/pom.xml +++ b/src/it/shadedGroovy/uberModule/pom.xml @@ -19,7 +19,7 @@ indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -29,7 +29,7 @@ nonindy - org.codehaus.groovy + @groovyGroupId@ groovy @@ -38,7 +38,7 @@ pre2.3-indy - org.codehaus.groovy + @groovyGroupId@ groovy indy @@ -48,7 +48,7 @@ pre2.3-nonindy - org.codehaus.groovy + @groovyGroupId@ groovy diff --git a/src/main/java/org/codehaus/gmavenplus/mojo/AbstractCompileMojo.java b/src/main/java/org/codehaus/gmavenplus/mojo/AbstractCompileMojo.java index abc78b9fe..ee793505a 100644 --- a/src/main/java/org/codehaus/gmavenplus/mojo/AbstractCompileMojo.java +++ b/src/main/java/org/codehaus/gmavenplus/mojo/AbstractCompileMojo.java @@ -40,11 +40,21 @@ */ public abstract class AbstractCompileMojo extends AbstractGroovySourcesMojo { + /** + * Groovy 4.0.0 alpha-1 version. + */ + protected static final Version GROOVY_4_0_0_ALPHA1 = new Version(4, 0, 0, "alpha-1"); + /** * Groovy 3.0.6 version. */ protected static final Version GROOVY_3_0_6 = new Version(3, 0, 6); + /** + * Groovy 3.0.5 version. + */ + protected static final Version GROOVY_3_0_5 = new Version(3, 0, 5); + /** * Groovy 3.0.3 version. */ @@ -146,6 +156,7 @@ public abstract class AbstractCompileMojo extends AbstractGroovySourcesMojo { *
  • 13
  • *
  • 14
  • *
  • 15
  • + *
  • 16
  • * * Using 1.6 or 1.7 requires Groovy >= 2.1.3. * Using 1.8 requires Groovy >= 2.3.3. @@ -203,10 +214,20 @@ public abstract class AbstractCompileMojo extends AbstractGroovySourcesMojo { /** * Whether to support invokeDynamic (requires Java 7 or greater and Groovy indy 2.0.0-beta-3 or greater). + * Has no effect for Groovy 4, as it is always enabled. */ @Parameter(defaultValue = "false") protected boolean invokeDynamic; + /** + * Whether to enable Groovy's parallel parsing. Requires Groovy 3.0.5. + * Is enabled by default for Groovy 4.0.0-alpha-1 or newer. + * + * @since 1.11.0 + */ + @Parameter + protected Boolean parallelParsing = null; + /** * A script for tweaking the configuration options * (requires Groovy 2.1.0-beta-1 or greater). Note that its encoding must match your source encoding. @@ -385,13 +406,14 @@ protected Object setupCompilerConfiguration(final File compileOutputDirectory, f invokeMethod(findMethod(compilerConfigurationClass, "setSourceEncoding", String.class), compilerConfiguration, sourceEncoding); } invokeMethod(findMethod(compilerConfigurationClass, "setTargetDirectory", String.class), compilerConfiguration, compileOutputDirectory.getAbsolutePath()); - if (invokeDynamic) { + if (invokeDynamic || groovyAtLeast(GROOVY_4_0_0_ALPHA1)) { if (groovyAtLeast(GROOVY_2_0_0_BETA3)) { if (classWrangler.isGroovyIndy()) { if (isJavaSupportIndy()) { Map optimizationOptions = (Map) invokeMethod(findMethod(compilerConfigurationClass, "getOptimizationOptions"), compilerConfiguration); optimizationOptions.put("indy", true); optimizationOptions.put("int", false); + getLog().info("invokedynamic enabled."); } else { getLog().warn("Requested to use to use invokedynamic, but your Java version (" + getJavaVersionString() + ") doesn't support it. Ignoring invokeDynamic parameter."); } @@ -413,6 +435,15 @@ protected Object setupCompilerConfiguration(final File compileOutputDirectory, f getLog().warn("Requested to use parameters, but your Groovy version (" + classWrangler.getGroovyVersionString() + ") doesn't support it (must be " + GROOVY_2_5_0_ALPHA1 + " or newer). Ignoring parameters parameter."); } } + if (groovyAtLeast(GROOVY_3_0_5)) { + if ((parallelParsing == null && groovyAtLeast(GROOVY_4_0_0_ALPHA1)) || (parallelParsing != null && parallelParsing)) { + Map optimizationOptions = (Map) invokeMethod(findMethod(compilerConfigurationClass, "getOptimizationOptions"), compilerConfiguration); + optimizationOptions.put("parallelParse", true); + getLog().info("Parallel parsing enabled."); + } else { + getLog().info("Parallel parsing disabled."); + } + } return compilerConfiguration; } diff --git a/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGenerateStubsMojo.java b/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGenerateStubsMojo.java index 79dd47e88..172a6ab93 100644 --- a/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGenerateStubsMojo.java +++ b/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGenerateStubsMojo.java @@ -150,6 +150,7 @@ public abstract class AbstractGenerateStubsMojo extends AbstractGroovyStubSource *
  • 13
  • *
  • 14
  • *
  • 15
  • + *
  • 16
  • * * Using 1.6 or 1.7 requires Groovy >= 2.1.3. * Using 1.8 requires Groovy >= 2.3.3. @@ -221,15 +222,6 @@ public abstract class AbstractGenerateStubsMojo extends AbstractGroovyStubSource @Parameter(defaultValue = "PROJECT_ONLY") protected IncludeClasspath includeClasspath; - /** - * Whether the bytecode version has preview features enabled (JEP 12). - * Requires Groovy >= 3.0.0-beta-1 or Groovy >= 2.5.7, but not any 2.6 versions and Java >= 12. - * - * @since 1.7.1 - */ - @Parameter(defaultValue = "false") - protected boolean previewFeatures; - /** * Performs the stub generation on the specified source files. * @@ -294,17 +286,6 @@ protected Object setupCompilerConfiguration(final File outputDirectory, final Cl invokeMethod(findMethod(compilerConfigurationClass, "setWarningLevel", int.class), compilerConfiguration, warningLevel); invokeMethod(findMethod(compilerConfigurationClass, "setTolerance", int.class), compilerConfiguration, tolerance); invokeMethod(findMethod(compilerConfigurationClass, "setTargetBytecode", String.class), compilerConfiguration, targetBytecode); - if (previewFeatures) { - if (isJavaSupportPreviewFeatures()) { - if (groovyOlderThan(GROOVY_2_5_7) || (groovyAtLeast(GROOVY_2_6_0_ALPHA1) && groovyOlderThan(GROOVY_3_0_0_BETA1))) { - getLog().warn("Requested to use preview features, but your Groovy version (" + classWrangler.getGroovyVersionString() + ") doesn't support it (must be " + GROOVY_2_5_7 + "/" + GROOVY_3_0_0_BETA1 + " or newer. No 2.6 version is supported. Ignoring previewFeatures parameter."); - } else { - invokeMethod(findMethod(compilerConfigurationClass, "setPreviewFeatures", boolean.class), compilerConfiguration, previewFeatures); - } - } else { - getLog().warn("Requested to use to use preview features, but your Java version (" + getJavaVersionString() + ") doesn't support it. Ignoring previewFeatures parameter."); - } - } if (sourceEncoding != null) { invokeMethod(findMethod(compilerConfigurationClass, "setSourceEncoding", String.class), compilerConfiguration, sourceEncoding); } diff --git a/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java b/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java index f099ff2eb..0631a2cda 100644 --- a/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java +++ b/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java @@ -44,6 +44,11 @@ */ public abstract class AbstractGroovyDocMojo extends AbstractGroovySourcesMojo { + /** + * Groovy 3.0.0 alpha-4 version. + */ + protected static final Version GROOVY_3_0_0_ALPHA_4 = new Version(3, 0, 0, "alpha-4"); + /** * Groovy 1.6.0 RC-2 version. */ @@ -190,6 +195,7 @@ public abstract class AbstractGroovyDocMojo extends AbstractGroovySourcesMojo { /** * Allows you to override the class that is normally org.codehaus.groovy.tools.groovydoc.OutputTool, for use when * creating custom GroovyDoc implementations. + * * @since 1.10.1 */ @Parameter @@ -232,6 +238,14 @@ public abstract class AbstractGroovyDocMojo extends AbstractGroovySourcesMojo { @Parameter protected String linkArgumentClass = null; + /** + * Enable attaching GroovyDoc annotation. Requires Groovy 3.0.0 alpha-4 or newer. + * + * @since 1.11.0 + */ + @Parameter(defaultValue = "false") + protected boolean attachGroovyDocAnnotation; + /** * Generates the GroovyDoc for the specified sources. * @@ -278,6 +292,13 @@ protected synchronized void doGroovyDocGeneration(final FileSet[] sourceDirector Class classpathResourceManagerClass = classWrangler.getClass(this.classpathResourceManagerClass == null ? "org.codehaus.groovy.tools.groovydoc.ClasspathResourceManager" : this.classpathResourceManagerClass); // set up GroovyDoc options + if (attachGroovyDocAnnotation) { + if (groovyAtLeast(GROOVY_3_0_0_ALPHA_4)) { + System.setProperty("runtimeGroovydoc", "true"); + } else { + getLog().warn("Requested to enable attaching GroovyDoc annotation, but your Groovy version (" + classWrangler.getGroovyVersionString() + ") doesn't support it (must be " + GROOVY_3_0_0_ALPHA_4 + " or newer). Ignoring enableGroovyDocAnnotation parameter."); + } + } Properties docProperties = setupProperties(); Object fileOutputTool = invokeConstructor(findConstructor(fileOutputToolClass)); Object classpathResourceManager = invokeConstructor(findConstructor(classpathResourceManagerClass)); diff --git a/src/main/java/org/codehaus/gmavenplus/mojo/ShellMojo.java b/src/main/java/org/codehaus/gmavenplus/mojo/ShellMojo.java index 31f547eb0..ed28e1369 100644 --- a/src/main/java/org/codehaus/gmavenplus/mojo/ShellMojo.java +++ b/src/main/java/org/codehaus/gmavenplus/mojo/ShellMojo.java @@ -21,6 +21,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; +import org.codehaus.gmavenplus.model.Version; import org.codehaus.gmavenplus.util.NoExitSecurityManager; import java.lang.reflect.InvocationTargetException; @@ -42,6 +43,11 @@ @Mojo(name = "shell", requiresDependencyResolution = ResolutionScope.TEST, configurator = "include-project-test-dependencies") public class ShellMojo extends AbstractToolsMojo { + /** + * Groovy 4.0.0 alpha-1 version. + */ + protected static final Version GROOVY_4_0_0_ALPHA1 = new Version(4, 0, 0, "alpha-1"); + /** * Groovy shell verbosity level. Should be one of: *
      @@ -86,7 +92,7 @@ public void execute() throws MojoExecutionException { } // get classes we need with reflection - Class shellClass = classWrangler.getClass("org.codehaus.groovy.tools.shell.Groovysh"); + Class shellClass = classWrangler.getClass(groovyAtLeast(GROOVY_4_0_0_ALPHA1) ? "org.apache.groovy.groovysh.Groovysh" : "org.codehaus.groovy.tools.shell.Groovysh"); Class bindingClass = classWrangler.getClass("groovy.lang.Binding"); Class ioClass = classWrangler.getClass("org.codehaus.groovy.tools.shell.IO"); Class verbosityClass = classWrangler.getClass("org.codehaus.groovy.tools.shell.IO$Verbosity"); diff --git a/src/main/java/org/codehaus/gmavenplus/util/ClassWrangler.java b/src/main/java/org/codehaus/gmavenplus/util/ClassWrangler.java index 0e476f745..80ff5aa2e 100644 --- a/src/main/java/org/codehaus/gmavenplus/util/ClassWrangler.java +++ b/src/main/java/org/codehaus/gmavenplus/util/ClassWrangler.java @@ -210,10 +210,15 @@ public static boolean groovyOlderThan(Version detectedVersion, Version compareTo public boolean isGroovyIndy() { if (isIndy == null) { try { - getClass("org.codehaus.groovy.vmplugin.v7.IndyInterface"); + getClass("org.codehaus.groovy.vmplugin.v8.IndyInterface"); isIndy = true; - } catch (ClassNotFoundException e) { - isIndy = false; + } catch (ClassNotFoundException e1) { + try { + getClass("org.codehaus.groovy.vmplugin.v7.IndyInterface"); + isIndy = true; + } catch (ClassNotFoundException e2) { + isIndy = false; + } } } diff --git a/src/test/java/org/codehaus/gmavenplus/mojo/AbstractToolsMojoTest.java b/src/test/java/org/codehaus/gmavenplus/mojo/AbstractToolsMojoTest.java index f603638c8..87bd4105b 100644 --- a/src/test/java/org/codehaus/gmavenplus/mojo/AbstractToolsMojoTest.java +++ b/src/test/java/org/codehaus/gmavenplus/mojo/AbstractToolsMojoTest.java @@ -16,22 +16,17 @@ package org.codehaus.gmavenplus.mojo; -import groovy.util.AntBuilder; import org.apache.maven.artifact.Artifact; -import org.apache.maven.execution.MavenExecutionRequest; -import org.apache.maven.execution.MavenExecutionResult; import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Model; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.project.MavenProject; import org.codehaus.gmavenplus.util.ClassWrangler; -import org.codehaus.plexus.PlexusContainer; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import org.sonatype.aether.RepositorySystemSession; import java.util.List; import java.util.Properties; @@ -69,7 +64,14 @@ public void setup() throws Exception { testMojo.pluginArtifacts = pluginArtifacts; testMojo.mojoExecution = mojoExecution; testMojo.classWrangler = classWrangler; - doReturn(AntBuilder.class).when(classWrangler).getClass(anyString()); + Class antBuilderClass; + try { + antBuilderClass = Class.forName("groovy.ant.AntBuilder"); + } catch (ClassNotFoundException e) { + antBuilderClass = Class.forName("groovy.util.AntBuilder"); + } + + doReturn(antBuilderClass).when(classWrangler).getClass(anyString()); } @Test