diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java b/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java index 216c2e44f7..4b21a137ff 100644 --- a/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java +++ b/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java @@ -64,6 +64,18 @@ public class MetadataResolutionRequest private ArtifactMetadataSource metadataSource; private boolean resolveRoot = true; + + /** result type - flat list */ + private boolean asList = true; + + /** result type - dirty tree */ + private boolean asDirtyTree = false; + + /** result type - resolved tree */ + private boolean asResolvedTree = false; + + /** result type - graph */ + private boolean asGraph = false; public MetadataResolutionRequest() { @@ -207,4 +219,48 @@ public class MetadataResolutionRequest return sb.toString(); } + + public boolean isAsList() + { + return asList; + } + + public MetadataResolutionRequest setAsList( boolean asList ) + { + this.asList = asList; + return this; + } + + public boolean isAsDirtyTree() + { + return asDirtyTree; + } + + public MetadataResolutionRequest setAsDirtyTree( boolean asDirtyTree ) + { + this.asDirtyTree = asDirtyTree; + return this; + } + + public boolean isAsResolvedTree() + { + return asResolvedTree; + } + + public MetadataResolutionRequest setAsResolvedTree( boolean asResolvedTree ) + { + this.asResolvedTree = asResolvedTree; + return this; + } + + public boolean isAsGraph() + { + return asGraph; + } + + public MetadataResolutionRequest setAsGraph( boolean asGraph ) + { + this.asGraph = asGraph; + return this; + } } diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java index 90406b9a51..d26ca5fa22 100644 --- a/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java +++ b/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java @@ -65,6 +65,8 @@ public class MetadataResolutionResult private Set requestedArtifacts; private Set artifacts; + + private MetadataTreeNode resolvedTree; public Artifact getOriginatingArtifact() { @@ -340,4 +342,15 @@ public class MetadataResolutionResult return sb.toString(); } + + public MetadataTreeNode getResolvedTree() + { + return resolvedTree; + } + + public void setResolvedTree( MetadataTreeNode resolvedTree ) + { + this.resolvedTree = resolvedTree; + } + }