You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Rafal Figas (JIRA)" <ji...@codehaus.org> on 2011/12/30 15:18:03 UTC
[jira] (MDEP-128) Support ability to specify multiple
"includeScope" parameters
[ https://jira.codehaus.org/browse/MDEP-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287130#comment-287130 ]
Rafal Figas commented on MDEP-128:
----------------------------------
Wooow, this is REALLY counterintuitive. I found this, while I was trying to exclude test dependencies, exactly the same way as Bryan Stopp did. I think it would be VERY helpful if written at goal documentation in here:
http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
> Support ability to specify multiple "includeScope" parameters
> -------------------------------------------------------------
>
> Key: MDEP-128
> URL: https://jira.codehaus.org/browse/MDEP-128
> Project: Maven 2.x Dependency Plugin
> Issue Type: Improvement
> Affects Versions: 2.0-alpha-4
> Reporter: Bryan Stopp
> Assignee: Brian Fox
>
> You can only configure the plugin with either one includeScope or one excludeScope. When executing the plugin to copy dependencies with the following configuration:
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-dependency-plugin</artifactId>
> <executions>
> <execution>
> <id>copy-dependencies</id>
> <phase>validate</phase>
> <goals>
> <goal>copy-dependencies</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <outputDirectory>/src/main/webapp/WEB-INF/lib</outputDirectory>
> <overWriteReleases>false</overWriteReleases>
> <overWriteIfNewer>true</overWriteIfNewer>
> <overWriteSnapshots>true</overWriteSnapshots>
> <excludeScope>provided</excludeScope>
> </configuration>
> </plugin>
> It does exclude the provided scope, but it includes the test scope [easymock, dbunit, and junit appear in the output directory]. I tried to correct this problem by replacing the excludeScope parameter with two includeScope parameters, one for compile one for runtime, but only the first parameter was actually used.
> I also tried to exclude test but got an error, something like, "Can't exclude tests as that would exclude everything!".
> The goal is to be able to recreate the default copy functionality that is accomplished when executing a "mvn package" command, but be able to specify a maven-dependency-plugin configuration. When specifying this configuration, it overrides the default settings throughout the entire build life-cycle (as it should). But it is impossible to configure the plugin in the exact same was as the default settings.
> This is needed to support copying dependencies into the WEB-INF/lib folder within Eclipse workspaces, to support embedded application-server deployment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira