From d5c0d528c5cf956dd910e1ed3a7bf45e981aa77f Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sun, 30 Apr 2023 00:17:34 +0200 Subject: [PATCH] Require Maven 3.5.4+ --- .github/workflows/maven.yml | 4 +- pom.xml | 10 +--- .../multiple-executions/verify.groovy | 49 +++---------------- 3 files changed, 11 insertions(+), 52 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 218d4832..25d2e1b5 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -24,5 +24,5 @@ jobs: name: Verify uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3 with: - ff-maven: "3.8.6" # Maven version for fail-fast-build - maven-matrix: '[ "3.2.5", "3.8.6" ]' # Maven versions matrix for verify builds + ff-maven: "3.9.1" # Maven version for fail-fast-build + maven-matrix: '[ "3.5.4", "3.9.1" ]' # Maven versions matrix for verify builds diff --git a/pom.xml b/pom.xml index 0beca405..89866651 100644 --- a/pom.xml +++ b/pom.xml @@ -138,13 +138,6 @@ provided - - org.eclipse.aether - aether-util - - 1.0.0.v20140518 - - org.codehaus.plexus plexus-utils @@ -214,8 +207,9 @@ - 3.2.5 + 3.5.4 1.7.36 + 3.5.1 2022-07-15T02:43:45Z diff --git a/src/it/projects/multiple-executions/verify.groovy b/src/it/projects/multiple-executions/verify.groovy index 0c16113d..068b92c9 100644 --- a/src/it/projects/multiple-executions/verify.groovy +++ b/src/it/projects/multiple-executions/verify.groovy @@ -19,6 +19,7 @@ import java.io.* import java.util.* +import groovy.xml.XmlSlurper t = new IntegrationBase() @@ -43,52 +44,16 @@ def getProjectVersion() { return pom.version; } -def getMavenVersion(buildLog) { - def maven = null; - buildLog.eachLine { line -> - if (line.startsWith("Apache Maven 2.0.11")) { - maven = "2.0.11"; - } else if (line.startsWith("Apache Maven 2.2.1")) { - maven = "2.2.1"; - } else if (line.startsWith("Apache Maven 3.0.3")) { - maven = "3.0.3"; - } else if (line.startsWith("Apache Maven 3.0.4")) { - maven = "3.0.4"; - } else if (line.startsWith("Apache Maven 3.0.5")) { - maven = "3.0.5"; - } else if (line.startsWith("Apache Maven 3.1.0")) { - maven = "3.1.0"; - } else if (line.startsWith("Apache Maven 3.1.1")) { - maven = "3.1.1"; - } else if (line.startsWith("Apache Maven 3.2.1")) { - maven = "3.2.1"; - } - } - return maven -} - -def mavenVersion = getMavenVersion(buildLog) - - def projectVersion = getProjectVersion(); def pluginVersion = getPluginVersion(); println "Project version: ${projectVersion}" println "Plugin version ${pluginVersion}" -if (mavenVersion.equals("2.0.11") || mavenVersion.equals("2.2.1")) { - t.checkExistenceAndContentOfAFile(buildLog, [ - "[DEBUG] (f) arguments = [-cp, target/classes, Main]", - "[INFO] [exec:exec {execution: first-execution}]", - "[INFO] [exec:exec {execution: second-execution}]", - "[INFO] [exec:exec {execution: third-execution}]", - ]) -} else { - t.checkExistenceAndContentOfAFile(buildLog, [ - "[DEBUG] (f) arguments = [-cp, target/classes, Main]", - "[INFO] --- exec-maven-plugin:" + pluginVersion + ":exec (first-execution) @ multiple-execution ---", - "[INFO] --- exec-maven-plugin:" + pluginVersion + ":exec (second-execution) @ multiple-execution ---", - "[INFO] --- exec-maven-plugin:" + pluginVersion + ":exec (third-execution) @ multiple-execution ---", - ]) -} +t.checkExistenceAndContentOfAFile(buildLog, [ +"[DEBUG] (f) arguments = [-cp, target/classes, Main]", +"[INFO] --- exec-maven-plugin:" + pluginVersion + ":exec (first-execution) @ multiple-execution ---", +"[INFO] --- exec-maven-plugin:" + pluginVersion + ":exec (second-execution) @ multiple-execution ---", +"[INFO] --- exec-maven-plugin:" + pluginVersion + ":exec (third-execution) @ multiple-execution ---", +])