diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml index 4d67fdcf..e2a3e7ad 100644 --- a/.github/workflows/maven-verify.yml +++ b/.github/workflows/maven-verify.yml @@ -25,3 +25,8 @@ jobs: build: name: Verify uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3 + with: + maven-args: '-D"invoker.streamLogsOnFailures" -U' + # put this back when 3.4.0 with jdk19 support has been released + #jdk-matrix: '[ "8", "11", "17", "19"]' + # verify-fail-fast: false diff --git a/Jenkinsfile b/Jenkinsfile index e9f05f7d..e19d6a06 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,4 +17,5 @@ * under the License. */ -asfMavenTlpPlgnBuild() +// put 19 back when 3.4.0 with jdk19 support has been released +asfMavenTlpPlgnBuild(jdks:[ "8", "11", "17"]) diff --git a/pom.xml b/pom.xml index 9be881cb..61398927 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ under the License. maven-invoker-plugin - 3.3.1-SNAPSHOT + 3.4.0-SNAPSHOT maven-plugin Apache Maven Invoker Plugin @@ -70,9 +70,8 @@ under the License. org.apache-extras.beanshell bsh 2.0b6 - org.codehaus.groovy - 3.0.12 2022-05-25T15:26:55Z + 4.0.6 @@ -98,6 +97,13 @@ under the License. commons-io 2.11.0 + + org.apache.groovy + groovy-bom + ${groovy-version} + pom + import + @@ -159,14 +165,7 @@ under the License. org.apache.maven.shared maven-script-interpreter - 1.3 - - - - org.codehaus.groovy - groovy - - + 1.4-SNAPSHOT @@ -189,21 +188,18 @@ under the License. - ${groovy-groupId} + org.apache.groovy groovy - ${groovy-version} runtime - ${groovy-groupId} + org.apache.groovy groovy-json - ${groovy-version} runtime - ${groovy-groupId} + org.apache.groovy groovy-xml - ${groovy-version} runtime @@ -265,7 +261,6 @@ under the License. 1.7.36 test - @@ -332,6 +327,29 @@ under the License. 1.0.0 + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-org-codehaus-groovy + + enforce + + validate + + + + + org.codehaus.groovy:* + + true + + + + + + diff --git a/src/it/MINVOKER-196_junit_report_file/src/it/project/verify.groovy b/src/it/MINVOKER-196_junit_report_file/src/it/project/verify.groovy index a42a51af..a3406a71 100644 --- a/src/it/MINVOKER-196_junit_report_file/src/it/project/verify.groovy +++ b/src/it/MINVOKER-196_junit_report_file/src/it/project/verify.groovy @@ -17,6 +17,8 @@ * under the License. */ +import groovy.xml.XmlSlurper + // ensure script context contains localRepositoryPath assert new File( basedir, "../../../target/it-repo" ).canonicalFile.equals( localRepositoryPath ) diff --git a/src/it/MINVOKER-196_junit_report_file/verify.groovy b/src/it/MINVOKER-196_junit_report_file/verify.groovy index 34fb6f19..fe84996f 100644 --- a/src/it/MINVOKER-196_junit_report_file/verify.groovy +++ b/src/it/MINVOKER-196_junit_report_file/verify.groovy @@ -16,6 +16,8 @@ * specific language governing permissions and limitations * under the License. */ +import groovy.xml.XmlSlurper + File buildLog = new File( basedir, 'build.log' ) assert buildLog.text.contains( '[INFO] run post-build script verify.groovy' ) diff --git a/src/it/MINVOKER-288-failed-setup-run/verify.groovy b/src/it/MINVOKER-288-failed-setup-run/verify.groovy index 5aac8b50..edc0858b 100644 --- a/src/it/MINVOKER-288-failed-setup-run/verify.groovy +++ b/src/it/MINVOKER-288-failed-setup-run/verify.groovy @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ - +import groovy.xml.XmlSlurper File invokerReports = new File( new File(basedir, 'target'), 'invoker-reports-test' ) assert invokerReports.exists() diff --git a/src/it/MINVOKER-288-failed-setup-verify/verify.groovy b/src/it/MINVOKER-288-failed-setup-verify/verify.groovy index 991388b2..2e769ad0 100644 --- a/src/it/MINVOKER-288-failed-setup-verify/verify.groovy +++ b/src/it/MINVOKER-288-failed-setup-verify/verify.groovy @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ - +import groovy.xml.XmlSlurper File invokerReports = new File( new File(basedir, "target"), 'invoker-reports-test' ) assert invokerReports.exists() diff --git a/src/it/local-repo-url/src/it/project/postbuild.groovy b/src/it/local-repo-url/src/it/project/postbuild.groovy index a42a51af..a3406a71 100644 --- a/src/it/local-repo-url/src/it/project/postbuild.groovy +++ b/src/it/local-repo-url/src/it/project/postbuild.groovy @@ -17,6 +17,8 @@ * under the License. */ +import groovy.xml.XmlSlurper + // ensure script context contains localRepositoryPath assert new File( basedir, "../../../target/it-repo" ).canonicalFile.equals( localRepositoryPath ) diff --git a/src/it/script-classpath-duplicates/pom.xml b/src/it/script-classpath-duplicates/pom.xml index 1ba8f1d0..20a19265 100644 --- a/src/it/script-classpath-duplicates/pom.xml +++ b/src/it/script-classpath-duplicates/pom.xml @@ -41,7 +41,7 @@ under the License. test - @groovy-groupId@ + org.apache.groovy groovy @groovy-version@ pom diff --git a/src/it/script-streamLogs-false/verify.groovy b/src/it/script-streamLogs-false/verify.groovy index c8e84f25..7bd32933 100644 --- a/src/it/script-streamLogs-false/verify.groovy +++ b/src/it/script-streamLogs-false/verify.groovy @@ -40,9 +40,8 @@ assert beanshellLog.contains('java.lang.OutOfMemoryError: Requested array size e // groovy failed and no log message assert !buildLog.contains('[INFO] Output from groovy script') -assert !buildLog.contains('Assertion failed:') -assert !buildLog.contains('assert pom.contains("9.9.9")') -assert buildLog.contains('[INFO] org.apache.maven.shared.scriptinterpreter.ScriptEvaluationException: Assertion Error') +assert buildLog.contains('Assertion failed:') +assert buildLog.contains('assert pom.contains("9.9.9")') assert buildLog.contains('[INFO] groovy' + FS + 'pom.xml ................................... FAILED') assert groovyLog.contains('Output from groovy script') diff --git a/src/it/script-verify-xml/verify.groovy b/src/it/script-verify-xml/verify.groovy index c1409bf6..be3f550f 100644 --- a/src/it/script-verify-xml/verify.groovy +++ b/src/it/script-verify-xml/verify.groovy @@ -17,6 +17,8 @@ * under the License. */ +import groovy.xml.XmlSlurper + // from http://groovy-lang.org/processing-xml.html // A lot of examples covering xml assertions diff --git a/src/it/selector-scripts/setup.groovy b/src/it/selector-scripts/setup.groovy index 054111a1..44b015ce 100644 --- a/src/it/selector-scripts/setup.groovy +++ b/src/it/selector-scripts/setup.groovy @@ -17,11 +17,11 @@ * under the License. */ -import org.apache.commons.io.FileUtils +import java.io.File // Previous potential target 'content' has impact on IT execution // (Some new file should be created by verify.sh) -FileUtils.deleteQuietly( new File( basedir, "target/invoker-reports-test" ) ); -FileUtils.deleteQuietly( new File( basedir, "src/it/script-ret-quiet/target" ) ); -FileUtils.deleteQuietly( new File( basedir, "src/it/script-ret-true/target" ) ); +new File( basedir, "target/invoker-reports-test" ).deleteDir() +new File( basedir, "src/it/script-ret-quiet/target" ).deleteDir() +new File( basedir, "src/it/script-ret-true/target" ).deleteDir() return true; diff --git a/src/it/settings-merge_jdk9+/src/it/project/postbuild.groovy b/src/it/settings-merge_jdk9+/src/it/project/postbuild.groovy index 756af0f7..065f64df 100644 --- a/src/it/settings-merge_jdk9+/src/it/project/postbuild.groovy +++ b/src/it/settings-merge_jdk9+/src/it/project/postbuild.groovy @@ -17,6 +17,8 @@ * under the License. */ +import groovy.xml.XmlSlurper + File effectiveSettings = new File( basedir, "effective-settings.xml" ) assert effectiveSettings.isFile() diff --git a/src/site/apt/groovy-version.apt.vm b/src/site/apt/groovy-version.apt.vm index fd3dc9ef..bc1d17f9 100644 --- a/src/site/apt/groovy-version.apt.vm +++ b/src/site/apt/groovy-version.apt.vm @@ -31,13 +31,13 @@ Groovy version and extensions <>: Plugin <<>> in versions older than <<<3.3.0>>> has dependency on <<>> artifact from <<>>. - Plugin <<>> in version <<<3.3.0>>> has only dependency on <<>> core add common extensions: + Plugin <<>> in version <<<3.4.0>>> has only dependency on <<>> core add common extensions: - * <<>> + * <<>> - * <<>> + * <<>> - * <<>> + * <<>> [] @@ -54,7 +54,7 @@ Groovy version and extensions ..... - org.codehaus.groovy + org.apache.groovy groovy-yaml 3.0.10 @@ -65,14 +65,5 @@ Groovy version and extensions +------------------ - <>: In plugin version <<<3.3.0>>> only <<>> extensions can be used. + <>: In plugin version <<<3.3.0>>> only <<>> extensions can be used. -Groovy 4 - - Please be noted that in <<>> maven <<>> was changed - from <> to <>. - - Plugin has dependency on <<>> artifacts with old <<>>, - what causes that <<>> can not by used in scripts. - - Next version of <<>> can contains <<>> as default.