Implement Maven dependency checker
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bea 2023-01-16 05:24:40 +01:00
parent 118979bde4
commit 4f615378a6
2 changed files with 21 additions and 0 deletions

View File

@ -25,6 +25,12 @@ steps:
commands: commands:
- mvn test --no-transfer-progress -B -V - mvn test --no-transfer-progress -B -V
# check maven dependencies
- name: dependency-check
image: maven:3-eclipse-temurin-16
commands:
- mvn dependency-check:check --no-transfer-progress -B -V
# run code analysis # run code analysis
- name: code-analysis - name: code-analysis
image: maven:3-eclipse-temurin-16 image: maven:3-eclipse-temurin-16

15
pom.xml
View File

@ -12,6 +12,9 @@
<maven.compiler.source>16</maven.compiler.source> <maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target> <maven.compiler.target>16</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.dependencyCheck.htmlReportPath>./target/dependency-check-report.html</sonar.dependencyCheck.htmlReportPath>
<sonar.dependencyCheck.jsonReportPath>./target/dependency-check-report.json</sonar.dependencyCheck.jsonReportPath>
<sonar.dependencyCheck.summarize>true</sonar.dependencyCheck.summarize>
</properties> </properties>
<dependencies> <dependencies>
@ -138,6 +141,18 @@
<version>3.9.1.2184</version> <version>3.9.1.2184</version>
</plugin> </plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>8.0.0</version>
<configuration>
<formats>
<format>html</format>
<format>json</format>
</formats>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>