1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-04 04:07:16 +02:00

update maven-pmd-plugin to 3.14.0 (#2803)

Fixes #2766

Co-authored-by: Thomas Hoffmann <tho.hoffmann@sap.com>
This commit is contained in:
Florian Wilhelm 2021-05-04 14:43:40 +02:00 committed by GitHub
parent d34d897691
commit 83651b750f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -100,7 +100,7 @@ func getPmdMavenParameters(config *mavenExecuteStaticCodeChecksOptions) *maven.E
mavenOptions := maven.ExecuteOptions{
// check goal executes pmd goal first and fails the build if any violations were found
Goals: []string{"org.apache.maven.plugins:maven-pmd-plugin:3.13.0:check"},
Goals: []string{"org.apache.maven.plugins:maven-pmd-plugin:3.14.0:check"},
Defines: defines,
}

View File

@ -38,7 +38,7 @@ func TestRunMavenStaticCodeChecks(t *testing.T) {
"-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn",
"--batch-mode",
"com.github.spotbugs:spotbugs-maven-plugin:4.1.4:check",
"org.apache.maven.plugins:maven-pmd-plugin:3.13.0:check",
"org.apache.maven.plugins:maven-pmd-plugin:3.14.0:check",
},
}
@ -74,7 +74,7 @@ func TestGetPmdMavenParameters(t *testing.T) {
PmdMaxAllowedViolations: 5,
}
expected := maven.ExecuteOptions{
Goals: []string{"org.apache.maven.plugins:maven-pmd-plugin:3.13.0:check"},
Goals: []string{"org.apache.maven.plugins:maven-pmd-plugin:3.14.0:check"},
Defines: []string{"-Dpmd.maxAllowedViolations=5", "-Dpmd.failurePriority=2"},
}
@ -87,7 +87,7 @@ func TestGetPmdMavenParameters(t *testing.T) {
PmdMaxAllowedViolations: 5,
}
expected := maven.ExecuteOptions{
Goals: []string{"org.apache.maven.plugins:maven-pmd-plugin:3.13.0:check"},
Goals: []string{"org.apache.maven.plugins:maven-pmd-plugin:3.14.0:check"},
Defines: []string{"-Dpmd.maxAllowedViolations=5"},
}
@ -96,7 +96,7 @@ func TestGetPmdMavenParameters(t *testing.T) {
t.Run("should return maven goal only", func(t *testing.T) {
config := mavenExecuteStaticCodeChecksOptions{}
expected := maven.ExecuteOptions{
Goals: []string{"org.apache.maven.plugins:maven-pmd-plugin:3.13.0:check"}}
Goals: []string{"org.apache.maven.plugins:maven-pmd-plugin:3.14.0:check"}}
assert.Equal(t, &expected, getPmdMavenParameters(&config))
})