Clara, The dependency plugin uses the core scope filter to decide if something is included in a scope. This is not the same as filtering on the declared scope of a dependency, rather the effective scope. Everything is needed for the test scope, so if I ask the filter "Is this in the test scope?" the answer is always yes. The net effect of this is that you would exclude everything, which is why it throws that exception to tell you that you have misconfigured.
There easiest solution is to make include scope a comma separated list so you can specify the ones to include so you could do compile,runtime. This would need to be added in the next version. In the meantime you could use the artifact or groupid filters to exclude the items you don't want. These do currently support a comma separated list. --Brian -----Original Message----- From: clarako [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 18, 2007 4:56 AM To: users@maven.apache.org Subject: Re: [maven-dependency-plugin] v 2.0-alpha-4 : include/exclude scopes Wayne, I'm using Maven for a commercial project and I'm making a release build. I believe our test dependencies should be excluded from the release build, since the customer will/should never run the tests. So this is why I would need the "all but test" scope. In the source of the maven-dependency-plugin, I saw that you cannot exclude the test scope, as ScopeArtifactFilter does not support it. When I tried to work around it, I got a stack trace with the given pom. (please see link). http://www.nabble.com/file/p12752781/stack_trace.txt stack_trace.txt Regards, Clara Wayne Fay wrote: > > I don't believe "all but test" as a possible scope makes much sense > when you're thinking about valid use/business cases. Can you think of > such a real-life situation? > > Also, it might be helpful to review the Maven Dependency Scope section > on this page: > http://maven.apache.org/guides/introduction/introduction-to-dependency-m echanism.html > > Wayne > > On 7/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> Hello ! >> >> I'd like to talk about the behaviour of the dependency:copy-depedencies >> plugin, when I add some include/exclude scopes parameters. >> I noticed that these parameters' types were just Strings, which means you >> can set only one include scope and one exclude scope in the config tag. >> >> After a few tests, I could establish a link between the parameter value >> and >> the dependencies selected. The array below describes these links : >> >> ------------------------------------------------------- >> param value -> dependencies scope >> ------------------------------------------------------- >> compile -> compile + provided >> runtime -> compile + runtime >> provided -> provided >> test -> compile + provided + runtime + test >> ------------------------------------------------------- >> >> Fortunately, I need to get only compile and runtime, which corresponds to >> a >> "runtime" value in the includeScope parameter. >> >> But imagine you need "compile + provided + runtime", which is an >> equivalent >> of "all but test". >> How can you configure the plugin to do that ? >> If I set excludeScope to "test", the build fails because I've excluded * >> all * the dependencies. >> If I set 2 include scopes (compile and runtime), it only takes the last >> one, and doesn't work much better... >> >> Perhaps you could change the mojo's parameters to give the user more >> possibilities ? >> >> Thanks ! >> >> Isabelle Guimiot >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-maven-dependency-plugin--v-2.0-alpha-4-%3A-includ e-exclude-scopes-tf4177712s177.html#a12752781 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]