Skip to content

Commit

Permalink
Require Maven 3.5.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Apr 30, 2023
1 parent 90b8337 commit d5c0d52
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 2 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,6 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-util</artifactId>
<!-- bound version with used Maven -->
<version>1.0.0.v20140518</version>
</dependency>

<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
Expand Down Expand Up @@ -214,8 +207,9 @@
</dependencies>

<properties>
<mavenVersion>3.2.5</mavenVersion>
<mavenVersion>3.5.4</mavenVersion>
<slf4j.version>1.7.36</slf4j.version>
<maven-invoker-plugin.version>3.5.1</maven-invoker-plugin.version>
<project.build.outputTimestamp>2022-07-15T02:43:45Z</project.build.outputTimestamp>
</properties>

Expand Down
49 changes: 7 additions & 42 deletions src/it/projects/multiple-executions/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.io.*
import java.util.*
import groovy.xml.XmlSlurper

t = new IntegrationBase()

Expand All @@ -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 ---",
])

0 comments on commit d5c0d52

Please sign in to comment.