Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aether-users] Determining all *possible* dependencies of an artifact (in the presence of version ranges)

Hi,

we are currently facing the problem of determining all *possible*
dependencies an artifact might have (either directly or indirectly).

So, if org.example:example:1.0 declares a (direct) dependency on
org.example:direct:[1.0,2.0) and the remote repository contains versions
1.0 and 1.1 of that artifact, we want an Aether request to return both.

Moreover, if org.example:direct:1.0 in turn depends on
org.example:transitive:1.0 and org.example:direct:1.1 depends on
org.example:transitive:1.1, then we want the resulting list of all
possible dependencies to include both org.example:transitive:1.0 and
org.example:transitive:1.1 as well.

Is there a simpler way than piecing this together with
ArtifactDescriptorRequests, VersionRangeRequests, and a bit of recursion?

As far as I can see, the graph returned by
RepositorySystem.collectDependencies(..) looks promising, but I am not
sure whether it is possible to configure the request such that we can
derive *all* possible paths through the dependency DAG from it or
whether version ranges have always been narrowed down to one version
prior to building the DAG.

Best wishes,

Andreas
-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

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

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


Back to the top