maven-plugins
maven-plugins copied to clipboard
copy-plugin ignores dependency exclusions
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.