首页 > 解决方案 > Dependency-Check-Maven 插件也扫描兄弟项目依赖

问题描述

我在多 pom 项目中使用 Dependency-Check-maven 插件。在生成报告时,它不仅扫描我的罐子,还扫描其他罐子。我只想扫描列出我的项目的罐子。

这是我父母 pom 中的插件。

<plugin>
    <groupId>org.owasp</groupId>
    <artifactId>dependency-check-maven</artifactId>
    <version>6.3.1</version>
    <configuration>
    <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
    <nugetconfAnalyzerEnabled>false</nugetconfAnalyzerEnabled>
    <nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>
    <retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled>
    <jarAnalyzerEnabled>true</jarAnalyzerEnabled>
    <failBuildOnAnyVulnerability>false</failBuildOnAnyVulnerability>
    <outputDirectory>target/build/docs</outputDirectory>
        <scanSet>   
            <fileSet>
                <directory>target/build/lib/third_party</directory>
            </fileSet>
        </scanSet>
        </configuration>
        <executions>
            <execution>
                <phase>package</phase>
                <goals>
                   <goal>check</goal>
                    <goal>aggregate</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

我需要扫描的罐子存在于 target/build/lib/third_party 文件夹中。

标签: javamavenmaven-plugin

解决方案


推荐阅读