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

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

commit f1fb9c109b31cc2542ddf226152360a8c0f33525
Author: Martin Stockhammer <[email protected]>
AuthorDate: Sat Mar 21 18:02:22 2020 +0100

    Additional documentation
---
 .../content/ManagedDefaultRepositoryContent.java      | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git 
a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java
 
b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java
index bc37a0e..4da98e1 100644
--- 
a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java
+++ 
b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java
@@ -174,6 +174,21 @@ public class ManagedDefaultRepositoryContent
 
 
     /// ************* End of new generation interface ******************
+
+    /**
+     * Removes the item from the filesystem. For namespaces, projects and 
versions it deletes
+     * recursively.
+     * For namespaces you have to be careful, because maven repositories may 
have sub namespaces
+     * parallel to projects. Which means deleting a namespaces also deletes 
the sub namespaces and
+     * not only the projects of the given namespace. Better run the delete for 
each project of
+     * a namespace.
+     *
+     * Artifacts are deleted as provided. No related artifacts will be deleted.
+     *
+     * @param item the item that should be removed
+     * @throws ItemNotFoundException if the item does not exist
+     * @throws ContentAccessException if some error occurred while accessing 
the filesystem
+     */
     @Override
     public void deleteItem( ContentItem item ) throws ItemNotFoundException, 
ContentAccessException
     {
@@ -201,8 +216,8 @@ public class ManagedDefaultRepositoryContent
         }
         catch ( IOException e )
         {
-            log.error( "Could not delete namespace directory {}: {}", 
itemPath, e.getMessage( ), e );
-            throw new ContentAccessException( "Error occured while deleting 
namespace " + item + ": " + e.getMessage( ), e );
+            log.error( "Could not delete item from path {}: {}", itemPath, 
e.getMessage( ), e );
+            throw new ContentAccessException( "Error occured while deleting 
item " + item + ": " + e.getMessage( ), e );
         }
     }
 

Reply via email to