我想避免在运行mvn clean install
时运行org.owasp dependency-check-maven。另一方面,我希望它在mvn clean site
上运行。
在我的pom文件中,我有这样的代码:
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>8.4.2</version>
<configuration>
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
<formats>
<format>html</format>
</formats>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
字符串
但是,到目前为止,在mvn clean install
期间运行了整个依赖项检查:
[INFO] --- dependency-check:8.4.2:check (default) @ project ---
[INFO] Checking for updates
[INFO] Skipping NVD check since last check was within 4 hours.
[INFO] Skipping RetireJS update since last update was within 24 hours.
[INFO] Skipping Hosted Suppressions file update since last update was within 2 hours.
[INFO] Skipping Known Exploited Vulnerabilities update check since last check was within 24 hours.
[INFO] Check for updates complete (18 ms)
型
这是冗长的,并且仅在需要整个站点时才需要。
如何只对mvn site
而不是mvn clean install
运行依赖项检查?
1条答案
按热度按时间pjngdqdw1#
该插件应该只在报告部分实际上定义
这里是文档https://jeremylong.github.io/DependencyCheck/dependency-check-maven/index.html的官方链接