diff options
author | Brett Porter <brett@apache.org> | 2010-12-30 01:29:50 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2010-12-30 01:29:50 +0000 |
commit | e28ae522d1ce049848d2a30fa4e2371b0b4be706 (patch) | |
tree | a94ab784a2529285dbc776213ed5c5b8f66a6ed2 /archiva-modules/plugins/metadata-store-jcr | |
parent | bf3058dbeb8d735072d51a180d794d7346a21b4a (diff) | |
download | archiva-e28ae522d1ce049848d2a30fa4e2371b0b4be706.tar.gz archiva-e28ae522d1ce049848d2a30fa4e2371b0b4be706.zip |
[MRM-1327] make sure getArtifacts query is restricted to the right repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1053780 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins/metadata-store-jcr')
-rw-r--r-- | archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java index 513237e40..22923eaba 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java @@ -79,7 +79,7 @@ public class JcrMetadataRepository static final String FACET_NODE_TYPE = "archiva:facet"; - private static final String QUERY_ARTIFACTS = "SELECT * FROM [" + ARTIFACT_NODE_TYPE + "]"; + private static final String QUERY_ARTIFACTS = "SELECT * FROM [" + ARTIFACT_NODE_TYPE + "] AS artifact"; private final Map<String, MetadataFacetFactory> metadataFacetFactories; @@ -630,7 +630,8 @@ public class JcrMetadataRepository { List<ArtifactMetadata> artifacts; - String q = QUERY_ARTIFACTS; + String q = QUERY_ARTIFACTS + " WHERE ISDESCENDANTNODE(artifact,'/" + getRepositoryContentPath( repositoryId ) + + "')"; try { |