2006/12/20, Mark Hobson <[EMAIL PROTECTED]>:
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.
I could see these plugins at least and I'm afraid it's not what I need. In my previous example with artifacts a, b, c, maven-dependency-tree would build a tree like this: a -> b -> c but dependency b -> c is lost. Is there another way which doesn't lose "duplicated" dependencies? Andrés
