I believe you need to have *two* executions of copy-dependencies goal with
in one case:
provided
in the second case:
system
Don't put the excludeScope element.
Thanks,
mohan kr
-Original Message-
From: Fiona Mahon [mailto:fma...@tssg.org]
Sent: Friday, June 19, 2009 5:23 AM
To: users@maven.apache.org
Subject: Dependency-copy:exclude & includeScope behaviour
Hi,
I am using the dependency plugin for maven to copy an artifact and its
dependencies to a particular folder, that causes the generated artifact
to be automatically started in a container (an OSGi container in this
instance).
Without specifying any include/excludeScope parameters, all dependent
components for my artifact are getting copied over, including the ones I
have already packaged in with the artifact during compile (as those
dependencies are defined as 'compile').
My artifact has 2 kinds of dependencies, the ones that are resolved
during compile and added into the artifact jar, and the ones that will
be available (provided) at runtime inside the container.
What I want to be able to do is only copy the dependencies that are to
be provided in the container, to the container folder along with my
artifact, but not copy the dependencies I have already taken care of by
including them inside the artifact jar already (i.e. using compile scope).
What I tried was to exclude the compile scope dependencies and include
the provided dependencies (see below), but what actually happened when I
did this was that I get all the dependencies copied, both compile and
provided.
org.apache.maven.plugins
maven-dependency-plugin
copy
install
copy
copy-dependencies
install
copy-dependencies
compile
provided
true
true
true
${kf.pssdependencies.deploy.dir}
I also tried to just exclude the compile scope, but this time I just get
the test dependencies copied over. I know there is some kind of
hierarchy of scopes but I haven't see anything anywhere explaining this.
I did see a post explaining how the code works:
public ScopeArtifactFilter( String scope )
{
if ( DefaultArtifact.SCOPE_COMPILE.equals( scope ) )
{ systemScope = true; providedScope = true; compileScope = true;
runtimeScope = false; testScope = false; }
else if ( DefaultArtifact.SCOPE_RUNTIME.equals( scope ) )
{ systemScope = false; providedScope = false; compileScope = true;
runtimeScope = true; testScope = false; }
else if ( DefaultArtifact.SCOPE_TEST.equals( scope ) )
{ systemScope = true; providedScope = true; compileScope = true;
runtimeScope = true; testScope = true; }
else
{ systemScope = false; providedScope = false; compileScope = false;
runtimeScope = false; testScope = false; }
}
However, what I really want is
SystemScope = true; providedScope = true; compileScope = false;
runtimeScope = false; testScope = false;
which doesn't seem to be accounted for.
Any help would be great, even a scope hierarchy.
Thanks,
Fiona.
--
Fiona Mahon
Pervasive Communication Services(PCS),
Applied Research
Telecommunications Software & Systems Group (TSSG),
ArcLabs Research and Innovation Building,
Waterford Institute of Technology,
Carriganore Campus, Carriganore,
Co. Waterford, Ireland
www: www.tssg.org/people/fmahon
tel: +353 (0)51 302 928
fax: +353 (0)51 341 100
e-mail: fma...@tssg.org
Skype: fiona_mahon
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org