maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Caraivan <ccarai...@axway.com>
Subject Copy transitive dependencies
Date Tue, 07 Jul 2009 16:28:13 GMT

Hello,

I have a plugin which needs to download & copy somewhere the transitive
dependencies of the project's dependencies (at least level 1, I'll see about
the rest).
So I have this: project -> dependencies -> transitive dependencies.
I extracted artifacts from the direct dependencies, so this part is ok.

For the rest of the mail, "artifact" is a direct dependency.
How can I access the transitive dependencies? I tried
artifact.getDependencyTrail() on the artifact - but this doesn't give me
what I need (I don't even understand exactly what getDependencyTrail() is
supposed to return :) ).

Next I tried creating MavenProjects from the artifact:
DefaultMavenProjectBuilder defaultMavenProjectBuilder = new
DefaultMavenProjectBuilder();
defaultMavenProjectBuilder.initialize();
mavenProject = defaultMavenProjectBuilder.buildFromRepository(artifact,
remoteRepositories, localRepository)
I was thinking of using getDependencies() on the project, but this gives me
a nice NPE. How can I use DefaultMavenProjectBuilder?

I also looked around at maven-dependency-plugin & others but I'm having
problems understanding exactly the parts I need (plus the documentation
isn't that great...).

Any ideas?

Kind regard,
Costin.
-- 
View this message in context: http://www.nabble.com/Copy-transitive-dependencies-tp24376786p24376786.html
Sent from the Maven Developers mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message