From 60796cdc59f8e3e7f8f9d2f16522cb7cb81cae00 Mon Sep 17 00:00:00 2001 From: Florian Wilhelm Date: Tue, 28 Jul 2020 09:58:56 +0200 Subject: [PATCH] Update maven spotbugs plugin to support Java 14 (#1852) --- cmd/mavenExecuteStaticCodeChecks.go | 2 +- cmd/mavenExecuteStaticCodeChecks_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/mavenExecuteStaticCodeChecks.go b/cmd/mavenExecuteStaticCodeChecks.go index 525af88e4e..01363ec164 100644 --- a/cmd/mavenExecuteStaticCodeChecks.go +++ b/cmd/mavenExecuteStaticCodeChecks.go @@ -72,7 +72,7 @@ func getSpotBugsMavenParameters(config *mavenExecuteStaticCodeChecksOptions) *ma mavenOptions := maven.ExecuteOptions{ // check goal executes spotbugs goal first and fails the build if any bugs were found - Goals: []string{"com.github.spotbugs:spotbugs-maven-plugin:3.1.12:check"}, + Goals: []string{"com.github.spotbugs:spotbugs-maven-plugin:4.0.4:check"}, Defines: defines, } diff --git a/cmd/mavenExecuteStaticCodeChecks_test.go b/cmd/mavenExecuteStaticCodeChecks_test.go index 037f31fced..0fa4ac8b43 100644 --- a/cmd/mavenExecuteStaticCodeChecks_test.go +++ b/cmd/mavenExecuteStaticCodeChecks_test.go @@ -34,7 +34,7 @@ func TestRunMavenStaticCodeChecks(t *testing.T) { "-Dpmd.failurePriority=2", "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn", "--batch-mode", - "com.github.spotbugs:spotbugs-maven-plugin:3.1.12:check", + "com.github.spotbugs:spotbugs-maven-plugin:4.0.4:check", "org.apache.maven.plugins:maven-pmd-plugin:3.13.0:check", }, } @@ -109,7 +109,7 @@ func TestGetSpotBugsMavenParameters(t *testing.T) { SpotBugsMaxAllowedViolations: 123, } expected := maven.ExecuteOptions{ - Goals: []string{"com.github.spotbugs:spotbugs-maven-plugin:3.1.12:check"}, + Goals: []string{"com.github.spotbugs:spotbugs-maven-plugin:4.0.4:check"}, Defines: []string{"-Dspotbugs.includeFilterFile=includeFilter.xml", "-Dspotbugs.excludeFilterFile=excludeFilter.xml", "-Dspotbugs.maxAllowedViolations=123"}, } @@ -118,7 +118,7 @@ func TestGetSpotBugsMavenParameters(t *testing.T) { t.Run("should return maven goal only", func(t *testing.T) { config := mavenExecuteStaticCodeChecksOptions{} expected := maven.ExecuteOptions{ - Goals: []string{"com.github.spotbugs:spotbugs-maven-plugin:3.1.12:check"}} + Goals: []string{"com.github.spotbugs:spotbugs-maven-plugin:4.0.4:check"}} assert.Equal(t, &expected, getSpotBugsMavenParameters(&config)) })