Note, Archiva couldn't use the DependencyTree component, as it made
assumptions about repository access, availability, search order, and
layout that simply were not true. (actually, this is a problem mostly in
maven/components, but it still affected Archiva).
So, we wrote our own dependency graph / tree routines. It's more
flexible, more reliable, faster, uses less memory, and more accurate
than the ones in maven components (and the shared dependency tree
component too). I even utilized a local version of select classes from
plexus-graph (that Jason wants to eventually use for dependency management).
Check it out: archiva-dependency-graph
<https://svn.apache.org/repos/asf/maven/archiva/trunk/archiva-base/archiva-dependency-graph/>
Especially the factory/facade class: DependencyGraphFactory.java
<https://svn.apache.org/repos/asf/maven/archiva/trunk/archiva-base/archiva-dependency-graph/src/main/java/org/apache/maven/archiva/dependency/DependencyGraphFactory.java>
I welcome you to look at it as a potential PoC for dependency handling
in maven 2.1.
It needs better non-javadoc documentation, but that'll come.
BTW. I wrote a VersionComparator that uses logic version sorting too in
Archiva. I didn't realize it was a tough thing to do, until I read
Kenney's email about versioning
<http://www.nabble.com/versioning-tf2842865s177.html#a7938087>.
Check it out: VersionComparator.java
<https://svn.apache.org/repos/asf/maven/archiva/trunk/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/VersionComparator.java>
- Joakim
Mark Hobson wrote:
Hi Kenney,
On 16/06/07, Kenney Westerhof <[EMAIL PROTECTED]> wrote:
Hi,
Just a quick question as to what this is for?
maven-dependency-tree is the shared component for computing dependency
trees from Maven's artifact resolution. The original code came from
project-info-reports:dependencies, which I extracted for reuse by
help:dependencies.
Is it used in 'help:dependencies'?
It was, although I've now moved help:dependencies to dependency:tree
after a recent discussion.
Is it/will it be used in maven-core?
It isn't at the moment, but I assume it will be replaced with the
graph based artifact resolution being discussed for 2.1.
I see the dependency plugin uses both dependency-tree and
dependency-analyzer,
what's the relation?
dependency-tree is as described above; dependency-analyzer performs a
bytecode analysis of compiled classes and determines which of the
declared and transitive dependencies are actually used.
If maven core eventually uses this, shouldn't it be moved into
maven-components?
Possibly, although I'd have thought the new artifact resolution for
2.1 would supersede this.
The help:dependencies goal shows a tree of dependencies, and it
didn't work too
well because the algorithm used there didn't match the internal
algorithm from
maven itself, so the report was quite useless. Is this an attempt to
fix that?
I assume you're talking about MDEP-97. See my comment in that issue,
but yes, the aim for this component is to accurately reflect what is
happening within Maven.
Hope this helps,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]