I have already assembled all runtime dependencies for my project in one output directory using the Maven Dependency plugin. Now I would like to assemble all additional test dependencies in a separate directory.
But when I include scope test
and exclude either compile
or runtime
scope, it still always copies all compile dependencies as well.
Is there a way to copy only the additional test dependencies?
My current configuration:
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-test-libs</id>
<phase>generate-test-resources</phase>
<goals><goal>copy-dependencies</goal></goals>
<configuration>
<outputDirectory>${project.build.directory}/test-libs</outputDirectory>
<includeScope>test</includeScope>
<excludeScope>compile</excludeScope>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>