The dependency plugin uses the same code as core to determine the scope.
Specifically, it calls a method (going by memory here) isScope(scope).
The test scope includes everything, so if used to exclude, you would get
nothing. You can use the copy goal to name specific dependencies if you
need to, or you could use other combinations of include/exclude
groups,artifacts,types etc to get what you need.

I think it's important that the dependency plugin continue to use the
same code to determine scope so that it matches the classpath provided
for a given scope.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 30, 2007 10:10 AM
To: users@maven.apache.org
Subject: [maven-dependency-plugin] v 2.0-alpha-4 : include/exclude
scopes


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]

Reply via email to