Hi,

You can use this project [1] to get the proper relationships.
Also you could take a look at the maven-project-info-reports-plugin [2],
which has a report that creates a dependency tree page.

Note however that using this code might result in different results
than are used by maven internally, since maven resolves dependencies
using a different algorithm.

AFAIK the plan is to use [1] in maven itself (in 2.1) so that all mojo's
will have access to a consistent set of dependency relationships.
It would be better though if maven itself provided some way for mojo's
to access this information to avoid duplicate resolution.

[1] https://svn.apache.org/repos/asf/maven/shared/trunk/maven-dependency-tree
[2] 
https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-project-info-reports-plugin

-- Kenney

Jan Van Besien wrote:
Hi all

I'm currently developping a maven plugin for which I need to be able to navigate over the dependencies (and transitive dependencies) of a project. I manage to get all dependencies, but I don't manage to get dependency relations between those dependencies.

I'll try to explain myself with an example. Say we have a project ROOT; ROOT depends on project A; project A depends on project B.

If I do ROOT.getDependencies(), I only get project A; without knowning that A depends on B.

If I use the ArtifactResolver.resolveTransitively() method, I can get a set containing A and B, but the information that A depends on B seems to be lost.

So what I would like to have is for example a way to find the dependencies of ROOT (=A) and then (recursively) the dependencies of A (=B), etc.

thanx in advance
Jan

---------------------------------------------------------------------
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