Possible Duplicate:
How to get access to Maven’s dependency hierarchy within a plugin.
The dependency:tree plugin:goal has an option 'verbose' which displays all conflicts & duplicates in the dependency tree. I am trying to reuse that information in my own mojo to generate reports, however - I can't seem to figure out exactly how that plugin is gathering all transitive dependencies\artifacts.
I've tried:
ArtifactResolutionResult result = _artifactCollector.collect( _project.getDependencyArtifacts(), _project.getArtifact(), _project.getManagedVersionMap(),
_localRepository, _project.getRemoteArtifactRepositories(), _artifactMetadataSource, null, Collections.EMPTY_LIST );
As far as I can tell this is how the tree goal is doing it with the exception of the listener.
Does anyone out there know how to do what I am asking?
UPDATE: I didn't search well enough apparently, my question is a duplicate of: this. Please vote to close as I have already done, thanks.