diff options
author | Olivier Lamy <olamy@apache.org> | 2012-08-04 21:27:44 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-08-04 21:27:44 +0000 |
commit | f507ef248154800740d3abde4e16c3439046be38 (patch) | |
tree | 2a90a2fbe3aab81760430dcbde681b141b99040c /archiva-modules/plugins/maven2-repository/src/main | |
parent | 2378be5050394f5fdd349b18fc4ea06ee86365a5 (diff) | |
download | archiva-f507ef248154800740d3abde4e16c3439046be38.tar.gz archiva-f507ef248154800740d3abde4e16c3439046be38.zip |
use dependency tree with aether for old webapp too
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1369471 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins/maven2-repository/src/main')
-rw-r--r-- | archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java index 1e03b7dfb..eec25bf37 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java @@ -68,7 +68,6 @@ import javax.inject.Inject; import javax.inject.Named; import java.io.File; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -122,8 +121,8 @@ public class Maven3DependencyTreeBuilder builder = defaultModelBuilderFactory.newInstance(); } - public List<TreeEntry> buildDependencyTree( List<String> repositoryIds, String groupId, String artifactId, - String version ) + public void buildDependencyTree( List<String> repositoryIds, String groupId, String artifactId, String version, + DependencyVisitor dependencyVisitor ) throws Exception { Artifact projectArtifact = factory.createProjectArtifact( groupId, artifactId, version ); @@ -141,7 +140,7 @@ public class Maven3DependencyTreeBuilder if ( repository == null ) { // metadata could not be resolved - return Collections.emptyList(); + return; } // MRM-1411 @@ -168,11 +167,20 @@ public class Maven3DependencyTreeBuilder } } + // FIXME take care of relative path + resolve( repository.getLocation(), groupId, artifactId, version, dependencyVisitor ); + } + + + public List<TreeEntry> buildDependencyTree( List<String> repositoryIds, String groupId, String artifactId, + String version ) + throws Exception + { + List<TreeEntry> treeEntries = new ArrayList<TreeEntry>(); TreeDependencyNodeVisitor treeDependencyNodeVisitor = new TreeDependencyNodeVisitor( treeEntries ); - // FIXME take care of relative path - resolve( repository.getLocation(), groupId, artifactId, version, treeDependencyNodeVisitor ); + buildDependencyTree( repositoryIds, groupId, artifactId, version, treeDependencyNodeVisitor ); log.debug( "treeEntrie: {}", treeEntries ); return treeEntries; |