maven-plugins icon indicating copy to clipboard operation
maven-plugins copied to clipboard

copy-plugin ignores dependency exclusions

Open mbleichner opened this issue 11 years ago • 0 comments

If you declare exclusions in your pom, e.g.

        <dependency>
            <groupId>org.jfree</groupId>
            <artifactId>jfreechart</artifactId>
            <version>1.0.15</version>
            <exclusions>
                <exclusion>
                    <artifactId>bcmail-jdk14</artifactId>
                    <groupId>bouncycastle</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>bcprov-jdk14</artifactId>
                    <groupId>bouncycastle</groupId>
                </exclusion>
            </exclusions>
        </dependency>

and you use

        <resource>
            <targetPath>...</targetPath>
            <dependency>
                <includeGroupIds>...</includeGroupIds>
                <includeScope>compile</includeScope>
            </dependency>
        </resource>

the excluded dependencies will get copied anyway.

The problem seems to be in CopyMojoHelper, line 276. The dependencies property contains all direct dependencies, regardless of exclusions.

mbleichner avatar Feb 04 '14 16:02 mbleichner