From 3ff3cc061a9b2271d75b3448851fe3671e8b978c Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Sat, 30 Jul 2022 16:28:46 -0400 Subject: [PATCH] Added sonarqube dependency scanning --- .gitignore | 2 ++ pom.xml | 86 ++++++++++++++++++++++++++++++++++++++++------- version-rules.xml | 17 ++++++++++ 3 files changed, 92 insertions(+), 13 deletions(-) create mode 100644 version-rules.xml diff --git a/.gitignore b/.gitignore index edfa00d..8c05886 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ .classpath .project .settings +sonarBuild.ps1 +sonarBuild.sh #Ignore all bin files target/ diff --git a/pom.xml b/pom.xml index c087e00..2641c28 100644 --- a/pom.xml +++ b/pom.xml @@ -8,13 +8,19 @@ 1.0-SNAPSHOT ProjectEulerJava - - http://www.example.com + https://www.matrixwv.com/projecteuler + UTF-8 - 14 - 14 + 18 + 18 + 18 + + + 18 + target/dependency-check-report.json + target/dependency-check-report.html @@ -31,7 +37,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 + 3.1.0 enforce-maven @@ -41,7 +47,7 @@ - 3.1.0 + 3.8.6 @@ -51,7 +57,7 @@ maven-clean-plugin - 3.1.0 + 3.2.0 @@ -60,9 +66,9 @@ maven-compiler-plugin - 3.8.1 + 3.10.1 - 14 + 18 @@ -71,7 +77,7 @@ maven-jar-plugin - 3.2.0 + 3.2.2 maven-install-plugin @@ -84,15 +90,15 @@ maven-site-plugin - 3.9.1 + 3.12.0 maven-project-info-reports-plugin - 3.1.1 + 3.3.0 maven-assembly-plugin - 3.3.0 + 3.4.0 package @@ -112,6 +118,60 @@ + + + org.codehaus.mojo + versions-maven-plugin + 2.11.0 + + file://${session.executionRootDirectory}/version-rules.xml + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + 3.9.1.2184 + + + org.jacoco + jacoco-maven-plugin + 0.8.8 + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + package + + report + + + + + + org.owasp + dependency-check-maven + 7.1.1 + + + verify + + check + + + + + + json + html + + + diff --git a/version-rules.xml b/version-rules.xml new file mode 100644 index 0000000..7ab49c9 --- /dev/null +++ b/version-rules.xml @@ -0,0 +1,17 @@ + + + + + (?i).*Alpha(?:-?\d+)? + (?i).*a(?:-?\d+)? + (?i).*Beta(?:-?\d+)? + (?i).*-B(?:-?\d+)? + (?i).*RC(?:-?\d+)? + (?i).*CR(?:-?\d+)? + (?i).*M(?:-?\d+)? + + + +