aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java5
1 files changed, 4 insertions, 1 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 d650abb86..1ed5841ed 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
@@ -313,6 +313,7 @@ public class JcrMetadataRepository
n.setProperty("systemPath", dependency.getSystemPath());
n.setProperty("optional", dependency.isOptional());
n.setProperty("projectId", dependency.getProjectId());
+ // TODO: Fixig
Node refNode = findArtifactNode(jcrSession, dependency.getNamespace(),
dependency.getProjectId(), dependency.getVersion(), dependency.getArtifactId());
if (refNode!=null) {
@@ -1646,7 +1647,9 @@ public class JcrMetadataRepository
private Node findArtifactNode(Session jcrSession, String namespace, String projectId,
String projectVersion, String id) throws RepositoryException {
-
+ if (namespace==null || projectId==null||projectVersion==null||id==null) {
+ return null;
+ }
Node root = jcrSession.getRootNode();
Node node = JcrUtils.getOrAddNode(root, "repositories");
for (Node n : JcrUtils.getChildNodes(node)) {