Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] Collecting list of transitive dependencies *and* necessary parent POMs

Hi again,

for the benefits of others, here's my findings so far (problem still
unsolved):

> Likewise, RepositorySystem.collectDependencies(..) doesn't seem to do
> what I want out of the box, but maybe there is a way to accomplish what
> I want using a custom DependencyCollector, but given the size of
> DefaultDependencyCollector's implementation I wanted to ask first
> whether something like this already exists.

I used the GetDependencyHierarchy as starting point of my odyssee
through Aether. So far I have found out the following:

- The solution to my problem *cannot* reside on the Aether side, as
Aether has no concept of "parent". The ArtifactDescriptor returned by
RepositorySystem.readArtifactDescriptor(..) just has dependencies but no
parent which Aether could make use during a subsequent
RepositorySystem.collectDependencies. Hence, a custom
DependencyCollector won't help.

- Maven's DefaultArtifactReader relies on a ModelBuilder. If I could get
a custum implementation to return a ModelBuildingResult with an
effective model listing the parents as dependencies I might be done.

- Maybe wrapping DefaultModelBuilder.build(..) and changing the
ModelBuildingResult's effective model on the fly so that the parent is
also listed as a dependency does the trick. Will try this out.

Any hints on how else to proceed are greatly appreciated, however.

Andreas

-- 
Codetrails GmbH
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top