aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata/metadata-repository-api
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-01-10 03:54:15 +0000
committerOlivier Lamy <olamy@apache.org>2014-01-10 03:54:15 +0000
commitaf42752e144d051c5bcfa2a6353c960c45dfef2a (patch)
tree2fbe716f21a0b6e808f531e255de48ca262643c7 /archiva-modules/metadata/metadata-repository-api
parent3a59b856d838f7c9c3eed20d65d3753c36ab57e5 (diff)
downloadarchiva-af42752e144d051c5bcfa2a6353c960c45dfef2a.tar.gz
archiva-af42752e144d051c5bcfa2a6353c960c45dfef2a.zip
when browsing we must be more relax to resolve dependencies especially with snapshot having released as parent pom
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1557021 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-repository-api')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java2
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/ReadMetadataRequest.java36
2 files changed, 37 insertions, 1 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java
index d43bed6a6..6d505f13d 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java
@@ -101,7 +101,7 @@ public class DefaultMetadataResolver
{
ReadMetadataRequest readMetadataRequest =
new ReadMetadataRequest().repositoryId( repoId ).namespace( namespace ).projectId(
- projectId ).projectVersion( projectVersion );
+ projectId ).projectVersion( projectVersion ).browsingRequest( true );
metadata = repositoryStorage.readProjectVersionMetadata( readMetadataRequest );
log.debug( "Resolved project version metadata from storage: {}", metadata );
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/ReadMetadataRequest.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/ReadMetadataRequest.java
index 6ee552151..56e9f02d2 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/ReadMetadataRequest.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/ReadMetadataRequest.java
@@ -36,6 +36,12 @@ public class ReadMetadataRequest
private Filter<String> filter;
+ /**
+ * define this request as a ui request to remove some constraints added for optimisations
+ * @since 2.0.0
+ */
+ private boolean browsingRequest;
+
public ReadMetadataRequest()
{
// no op
@@ -135,4 +141,34 @@ public class ReadMetadataRequest
this.filter = filter;
return this;
}
+
+ public boolean isBrowsingRequest()
+ {
+ return browsingRequest;
+ }
+
+ public void setBrowsingRequest( boolean browsingRequest )
+ {
+ this.browsingRequest = browsingRequest;
+ }
+
+ public ReadMetadataRequest browsingRequest( boolean browsingRequest )
+ {
+ this.browsingRequest = browsingRequest;
+ return this;
+ }
+
+ @Override
+ public String toString()
+ {
+ final StringBuilder sb = new StringBuilder( "ReadMetadataRequest{" );
+ sb.append( "repositoryId='" ).append( repositoryId ).append( '\'' );
+ sb.append( ", namespace='" ).append( namespace ).append( '\'' );
+ sb.append( ", projectId='" ).append( projectId ).append( '\'' );
+ sb.append( ", projectVersion='" ).append( projectVersion ).append( '\'' );
+ sb.append( ", filter=" ).append( filter );
+ sb.append( ", browsingRequest=" ).append( browsingRequest );
+ sb.append( '}' );
+ return sb.toString();
+ }
}