On 20/12/06, Andrés Viedma <[EMAIL PROTECTED]> wrote:
Hi all,

I'm developing a plugin and I need to know if one of the target project
dependencies depends on another one.

I've seen that a MavenProject object contains a list of Artifact objects
which contains a "dependency trail", but the problem is that this trail
misses the information of "duplicated" dependencies. For example, if we have
three projects a, b, c, with these dependencies:
a -> b
a -> c
b -> c

The list of Artifact's for project "a" (with each dependency trail), is:
b (a -> b)
c (a -> c)

The b->c dependency has been lost, and so I can't know if there's a
relationship between b and c.

So, my question is: how can I know, when running a mojo, if one of my
dependencies depends on another one?.

Sounds like you need maven-dependency-tree [1] - see help:dependencies
mojo [2] for example usage.

Mark

[1] http://svn.apache.org/repos/asf/maven/shared/trunk/maven-dependency-tree/
[2] 
http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DependenciesMojo.java

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to