On Jan 18, 2008, at 12:32 PM, Brian E. Fox wrote:
-----Original Message-----
From: David Blevins [mailto:[EMAIL PROTECTED]
Is there any way to get or make a tree of Artifact objects?
I've tried taking the list of Artifacts returned from
project.getArtifacts(), then wrapping them in my own "node" object
and
relinking them via the info in the dependency trail. This works fine
except that there is some information loss. Say two artifacts (a and
b) each depend on a thrid artifact (c). The "c" dependency will have
only one dependency trail showing either a or b and i'd like to see
both trails. I don't really need this info from the dependency trail
specifically, just want some way to get the whole graph with no loss
in relationships.
Dependency:tree
Or programmatically use the maven-dependency-tree jar.
Still digging through that code, but hopefully you can answer this
question real quick. The resulting structure is definitely a tree as
opposed to a graph (which could be fine). Does that mean given the A
and B depend on C scenario I described, there'll be two copies of C;
one C below A with A as it's parentNode, and one C below B with B as
it's parent node?
If the answer is yes, then I can easily re-arrange things to a graph
(multi-parent nodes). If no, then can you confirm my suspicion that I
could achieve what I'm after with a slightly varied version of
DependencyTreeResolutionListener?
Thanks!
-David
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]