You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2019/08/29 05:51:54 UTC

[archiva] branch feature/storage_refactoring updated (a0c3051 -> b782b98)

This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a change to branch feature/storage_refactoring
in repository https://gitbox.apache.org/repos/asf/archiva.git.


    from a0c3051  Modifying jcr import file for schema changes
     new ee382e7  Fixing MPE
     new b782b98  Adding license statement

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../repository/jcr/JcrMetadataRepository.java        |  5 ++++-
 .../src/test/resources/artifacts.xml                 | 20 ++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)


[archiva] 01/02: Fixing MPE

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch feature/storage_refactoring
in repository https://gitbox.apache.org/repos/asf/archiva.git

commit ee382e76f4cc18a2b7cd9f1aa5590a53b2b83051
Author: Martin Stockhammer <ma...@apache.org>
AuthorDate: Thu Aug 29 07:51:16 2019 +0200

    Fixing MPE
---
 .../archiva/metadata/repository/jcr/JcrMetadataRepository.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 d650abb..1ed5841 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)) {


[archiva] 02/02: Adding license statement

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch feature/storage_refactoring
in repository https://gitbox.apache.org/repos/asf/archiva.git

commit b782b9854f5427a11e9566307c47fa4f247a19dd
Author: Martin Stockhammer <ma...@apache.org>
AuthorDate: Thu Aug 29 07:51:33 2019 +0200

    Adding license statement
---
 .../src/test/resources/artifacts.xml                 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/archiva-modules/plugins/metadata-store-jcr/src/test/resources/artifacts.xml b/archiva-modules/plugins/metadata-store-jcr/src/test/resources/artifacts.xml
index 02e1064..b2ad976 100644
--- a/archiva-modules/plugins/metadata-store-jcr/src/test/resources/artifacts.xml
+++ b/archiva-modules/plugins/metadata-store-jcr/src/test/resources/artifacts.xml
@@ -1,4 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
 <sv:node sv:name="archiva"
          xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:archiva="http://archiva.apache.org/jcr/"
          xmlns:sv="http://www.jcp.org/jcr/sv/1.0"