剔除多余库
mvn dependency:tree dependency:analyze
mvn versions:display-plugin-updates versions:display-dependency-updates
配置maven文件:
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>6.2.2</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
...
</build>
...
</project>
使用Maven命令检测:
mvn verify
然后,/target/dependency-check-report.html
查看结果即可。