]> source.dussan.org Git - archiva.git/commitdiff
Additional tests
authorMartin Stockhammer <martin_s@apache.org>
Sat, 21 Mar 2020 17:02:47 +0000 (18:02 +0100)
committerMartin Stockhammer <martin_s@apache.org>
Sat, 21 Mar 2020 17:02:47 +0000 (18:02 +0100)
19 files changed:
archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContentTest.java
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0-source.jar [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0-source.jar.sha1 [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar.md5 [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar.sha1 [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.pom [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/2.0/samplejar-2.0.jar [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/2.0/samplejar-2.0.pom [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0-source.jar [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0-source.jar.sha1 [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar.md5 [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar.sha1 [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.pom [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/2.0/samplejar-2.0.jar [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/2.0/samplejar-2.0.pom [new file with mode: 0644]
archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/maven-metadata.xml [new file with mode: 0644]

index fc273a6838a8a0cdd44afbe837a377c877afc14c..2d7098d223ab1af20515c10ad615202d67083d31 100644 (file)
@@ -19,6 +19,7 @@ package org.apache.archiva.repository.maven.content;
  */
 
 import org.apache.archiva.common.filelock.FileLockManager;
+import org.apache.archiva.common.utils.PathUtil;
 import org.apache.archiva.common.utils.VersionComparator;
 import org.apache.archiva.configuration.ArchivaConfiguration;
 import org.apache.archiva.configuration.FileType;
@@ -28,11 +29,13 @@ import org.apache.archiva.model.ProjectReference;
 import org.apache.archiva.model.VersionedReference;
 import org.apache.archiva.repository.EditableManagedRepository;
 import org.apache.archiva.repository.LayoutException;
+import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.RepositoryContent;
 import org.apache.archiva.repository.content.Artifact;
 import org.apache.archiva.repository.content.BaseArtifactTypes;
 import org.apache.archiva.repository.content.ContentItem;
+import org.apache.archiva.repository.content.ItemNotFoundException;
 import org.apache.archiva.repository.content.ItemSelector;
 import org.apache.archiva.repository.content.Namespace;
 import org.apache.archiva.repository.content.Project;
@@ -1295,4 +1298,275 @@ public class ManagedDefaultRepositoryContentTest
 
     }
 
+    private Path copyRepository(String repoName) throws IOException, URISyntaxException
+    {
+        Path tempDir = Files.createTempDirectory( "archiva-repocontent" );
+        Path repoSource = Paths.get( Thread.currentThread( ).getContextClassLoader( ).getResource( "repositories/" + repoName ).toURI( ) );
+        assertTrue( Files.exists( repoSource ) );
+        FileUtils.copyDirectory( repoSource.toFile( ), tempDir.toFile() );
+        return tempDir;
+    }
+
+    private ManagedRepository createManagedRepoWithContent(String sourceRepoName) throws IOException, URISyntaxException
+    {
+        Path repoDir = copyRepository( sourceRepoName );
+        MavenManagedRepository repo = createRepository( sourceRepoName, sourceRepoName, repoDir );
+        ManagedDefaultRepositoryContent deleteRepoContent = new ManagedDefaultRepositoryContent( repo, artifactMappingProviders, fileTypes, fileLockManager );
+        deleteRepoContent.setMavenContentHelper( contentHelper );
+        return repo;
+    }
+
+    @Test
+    public void deleteNamespaceItem() throws IOException, URISyntaxException, ItemNotFoundException
+    {
+        ManagedRepository repo = createManagedRepoWithContent( "delete-repository" );
+        ManagedRepositoryContent myRepoContent = repo.getContent( );
+        Path repoRoot = repo.getAsset( "" ).getFilePath( );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/maven" )) );
+        ArchivaItemSelector selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.maven" ).build();
+        ContentItem item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Namespace );
+        myRepoContent.deleteItem( item );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/maven" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache" )) );
+
+        // Sub namespaces are deleted too
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar" )) );
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" ).build();
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Namespace );
+        myRepoContent.deleteItem( item );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar" )) );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar" )) );
+    }
+
+    @Test
+    public void deleteProjectItem() throws IOException, URISyntaxException, ItemNotFoundException
+    {
+        ManagedRepository repo = createManagedRepoWithContent( "delete-repository" );
+        ManagedRepositoryContent myRepoContent = repo.getContent( );
+        Path repoRoot = repo.getAsset( "" ).getFilePath( );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/maven/A" )) );
+        ArchivaItemSelector selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.maven" )
+            .withProjectId( "A" ).build();
+        ContentItem item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Project );
+        myRepoContent.deleteItem( item );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/maven" )) );
+        assertTrue( Files.exists( repoRoot.resolve( "org/apache/maven/samplejar/1.0" ) ) );
+        assertTrue( Files.exists( repoRoot.resolve( "org/apache/maven/samplejar/2.0" ) ) );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/maven/A" )) );
+
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar" )) );
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" )
+            .withProjectId( "samplejar" ).build();
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Project );
+        myRepoContent.deleteItem( item );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar" )) );
+    }
+
+    @Test
+    public void deleteVersionItem() throws IOException, URISyntaxException, ItemNotFoundException
+    {
+        ManagedRepository repo = createManagedRepoWithContent( "delete-repository" );
+        ManagedRepositoryContent myRepoContent = repo.getContent( );
+        Path repoRoot = repo.getAsset( "" ).getFilePath( );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/maven/A/1.0" )) );
+        ArchivaItemSelector selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.maven" )
+            .withProjectId( "A" )
+            .withVersion( "1.0" ).build();
+        ContentItem item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Version );
+        myRepoContent.deleteItem( item );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/maven/A" )) );
+        assertTrue( Files.exists( repoRoot.resolve( "org/apache/maven/samplejar/1.0" ) ) );
+        assertTrue( Files.exists( repoRoot.resolve( "org/apache/maven/samplejar/2.0" ) ) );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/maven/A/1.0" )) );
+
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar" )) );
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" )
+            .withProjectId( "samplejar" )
+            .withVersion( "2.0" ).build();
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Version );
+        myRepoContent.deleteItem( item );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/2.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar/1.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar/2.0" )) );
+    }
+
+    @Test
+    public void deleteArtifactItem() throws IOException, URISyntaxException, ItemNotFoundException
+    {
+        ManagedRepository repo = createManagedRepoWithContent( "delete-repository" );
+        ManagedRepositoryContent myRepoContent = repo.getContent( );
+        Path repoRoot = repo.getAsset( "" ).getFilePath( );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/maven/A/1.0/A-1.0.pom" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/maven/A/1.0/A-1.0.war" )) );
+        ArchivaItemSelector selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.maven" )
+            .withProjectId( "A" )
+            .withVersion( "1.0" )
+            .withArtifactId( "A" )
+            .withArtifactVersion( "1.0" )
+            .withExtension( "pom" )
+            .build();
+        ContentItem item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Artifact );
+        myRepoContent.deleteItem( item );
+        assertTrue( Files.exists( repoRoot.resolve( "org/apache/maven/samplejar/1.0" ) ) );
+        assertTrue( Files.exists( repoRoot.resolve( "org/apache/maven/samplejar/2.0" ) ) );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/maven/A/1.0/A-1.0.pom" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/maven/A/1.0/A-1.0.war" )) );
+
+
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar.md5" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar.sha1" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.pom" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0-source.jar" )) );
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" )
+            .withProjectId( "samplejar" )
+            .withVersion( "1.0" )
+            .withArtifactId( "samplejar" )
+            .withArtifactVersion( "1.0" )
+            .withExtension( "jar" )
+            .build();
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Artifact );
+        myRepoContent.deleteItem( item );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar.md5" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar.sha1" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.pom" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0-source.jar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/2.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar/1.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar/2.0" )) );
+
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" )
+            .withProjectId( "samplejar" )
+            .withVersion( "1.0" )
+            .withArtifactId( "samplejar" )
+            .withArtifactVersion( "1.0" )
+            .withClassifier( "source" )
+            .withExtension( "jar" )
+            .build();
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Artifact );
+        myRepoContent.deleteItem( item );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar.md5" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar.sha1" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.pom" )) );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0-source.jar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0-source.jar.sha1" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/2.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar/1.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar/2.0" )) );
+
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" )
+            .withProjectId( "samplejar" )
+            .withVersion( "1.0" )
+            .withArtifactId( "samplejar" )
+            .withArtifactVersion( "1.0" )
+            .withExtension( "jar.md5" )
+            .build();
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Artifact );
+        myRepoContent.deleteItem( item );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar" )) );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar.md5" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.jar.sha1" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0.pom" )) );
+        assertFalse( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0-source.jar" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/1.0/samplejar-1.0-source.jar.sha1" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/samplejar/2.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar/1.0" )) );
+        assertTrue( Files.exists(repoRoot.resolve( "org/apache/test/sub/samplejar/2.0" )) );
+
+
+    }
+
+    @Test
+    public void deleteItemNotFound() throws IOException, URISyntaxException, ItemNotFoundException
+    {
+        ManagedRepository repo = createManagedRepoWithContent( "delete-repository" );
+        ManagedRepositoryContent myRepoContent = repo.getContent( );
+        Path repoRoot = repo.getAsset( "" ).getFilePath( );
+
+        ArchivaItemSelector selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test2" )
+            .build( );
+
+        ContentItem item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Namespace );
+        try
+        {
+            myRepoContent.deleteItem( item );
+            assertTrue( "ItemNotFoundException expected for non existing namespace", false );
+        } catch ( ItemNotFoundException e) {
+        }
+
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" )
+            .withProjectId( "samplejar2" )
+            .build( );
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Project );
+        try
+        {
+            myRepoContent.deleteItem( item );
+            assertTrue( "ItemNotFoundException expected for non existing project", false );
+        } catch ( ItemNotFoundException e) {
+        }
+
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" )
+            .withProjectId( "samplejar" )
+            .withVersion("1.1")
+            .build( );
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Version );
+        try
+        {
+            myRepoContent.deleteItem( item );
+            assertTrue( "ItemNotFoundException expected for non existing version", false );
+        } catch ( ItemNotFoundException e) {
+        }
+
+        selector = ArchivaItemSelector.builder( )
+            .withNamespace( "org.apache.test" )
+            .withProjectId( "samplejar" )
+            .withVersion("1.0")
+            .withArtifactId( "samplejar" )
+            .withArtifactVersion( "1.0" )
+            .withExtension( "jax" )
+            .build( );
+        item = myRepoContent.getItem( selector );
+        assertTrue( item instanceof Artifact );
+        try
+        {
+            myRepoContent.deleteItem( item );
+            assertTrue( "ItemNotFoundException expected for non existing artifact", false );
+        } catch ( ItemNotFoundException e) {
+        }
+
+    }
+
 }
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0-source.jar b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0-source.jar
new file mode 100644 (file)
index 0000000..54d190b
--- /dev/null
@@ -0,0 +1 @@
+dummy content. sample file only.\r
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0-source.jar.sha1 b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0-source.jar.sha1
new file mode 100644 (file)
index 0000000..a5c1a4c
--- /dev/null
@@ -0,0 +1 @@
+754133cd9c36adef86d35b96c0e96e11a9c6bfc9  samplejar-1.0.jar
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar
new file mode 100644 (file)
index 0000000..54d190b
--- /dev/null
@@ -0,0 +1 @@
+dummy content. sample file only.\r
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar.md5 b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar.md5
new file mode 100644 (file)
index 0000000..a5c2bc9
--- /dev/null
@@ -0,0 +1 @@
+fd4275a6811332d67075ffd879d13d4a  samplejar-1.0.jar
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar.sha1 b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.jar.sha1
new file mode 100644 (file)
index 0000000..a5c1a4c
--- /dev/null
@@ -0,0 +1 @@
+754133cd9c36adef86d35b96c0e96e11a9c6bfc9  samplejar-1.0.jar
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.pom b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/1.0/samplejar-1.0.pom
new file mode 100644 (file)
index 0000000..9b104cd
--- /dev/null
@@ -0,0 +1,29 @@
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.test</groupId>
+  <artifactId>samplejar</artifactId>
+  <version>1.0</version>
+  <name>Maven Test Repository Artifact Discovery</name>
+  <!-- default packaging is jar -->
+  <!--packaging>jar</packaging-->
+</project>
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/2.0/samplejar-2.0.jar b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/2.0/samplejar-2.0.jar
new file mode 100644 (file)
index 0000000..54d190b
--- /dev/null
@@ -0,0 +1 @@
+dummy content. sample file only.\r
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/2.0/samplejar-2.0.pom b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/2.0/samplejar-2.0.pom
new file mode 100644 (file)
index 0000000..757fde4
--- /dev/null
@@ -0,0 +1,29 @@
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.test</groupId>
+  <artifactId>samplejar</artifactId>
+  <version>2.0</version>
+  <name>Maven Test Repository Artifact Discovery</name>
+  <!-- specified packaging -->
+  <packaging>jar</packaging>
+</project>
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/maven-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/samplejar/maven-metadata.xml
new file mode 100644 (file)
index 0000000..89de35f
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<metadata>
+  <groupId>org.apache.maven</groupId>
+  <artifactId>samplejar</artifactId>
+  <version>6.0-SNAPSHOT</version>
+  <versioning>
+    <release>2.0</release>
+    <latest>6.0-SNAPSHOT</latest>
+    <snapshot>
+      <buildNumber>26</buildNumber>
+    </snapshot>
+    <versions>
+      <version>6.0-SNAPSHOT</version>
+      <version>6.0-20060311.093250-41</version>
+      <version>6.0-20060311.183228-42</version>
+      <version>6.0-20060311.183228-40</version>
+      <version>6.0-20060311.183228-37</version>
+      <version>6.0-20060311.183228-30</version>
+      <version>6.0-20060311.183228-29</version>
+      <version>6.0-20060311.183228-6</version>
+      <version>6.0-20060311.183228-9</version>
+      <version>6.0-20060311.183228-10</version>
+      <version>6.0-20060313.001659-43</version>
+      <version>6.0-20060313.001659-41</version>
+      <version>6.0-20060313.001659-38</version>
+      <version>6.0-20060313.001659-31</version>
+      <version>6.0-20060313.001659-30</version>
+      <version>6.0-20060313.001659-7</version>
+      <version>6.0-20060313.001659-10</version>
+      <version>6.0-20060313.001659-11</version>
+    </versions>
+    <lastUpdated>20060313010719</lastUpdated>
+  </versioning>
+</metadata>
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0-source.jar b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0-source.jar
new file mode 100644 (file)
index 0000000..54d190b
--- /dev/null
@@ -0,0 +1 @@
+dummy content. sample file only.\r
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0-source.jar.sha1 b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0-source.jar.sha1
new file mode 100644 (file)
index 0000000..a5c1a4c
--- /dev/null
@@ -0,0 +1 @@
+754133cd9c36adef86d35b96c0e96e11a9c6bfc9  samplejar-1.0.jar
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar
new file mode 100644 (file)
index 0000000..54d190b
--- /dev/null
@@ -0,0 +1 @@
+dummy content. sample file only.\r
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar.md5 b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar.md5
new file mode 100644 (file)
index 0000000..a5c2bc9
--- /dev/null
@@ -0,0 +1 @@
+fd4275a6811332d67075ffd879d13d4a  samplejar-1.0.jar
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar.sha1 b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.jar.sha1
new file mode 100644 (file)
index 0000000..a5c1a4c
--- /dev/null
@@ -0,0 +1 @@
+754133cd9c36adef86d35b96c0e96e11a9c6bfc9  samplejar-1.0.jar
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.pom b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/1.0/samplejar-1.0.pom
new file mode 100644 (file)
index 0000000..b94cc5c
--- /dev/null
@@ -0,0 +1,29 @@
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.test.sub</groupId>
+  <artifactId>samplejar</artifactId>
+  <version>1.0</version>
+  <name>Maven Test Repository Artifact Discovery</name>
+  <!-- default packaging is jar -->
+  <!--packaging>jar</packaging-->
+</project>
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/2.0/samplejar-2.0.jar b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/2.0/samplejar-2.0.jar
new file mode 100644 (file)
index 0000000..54d190b
--- /dev/null
@@ -0,0 +1 @@
+dummy content. sample file only.\r
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/2.0/samplejar-2.0.pom b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/2.0/samplejar-2.0.pom
new file mode 100644 (file)
index 0000000..e5dc101
--- /dev/null
@@ -0,0 +1,29 @@
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.test.sub</groupId>
+  <artifactId>samplejar</artifactId>
+  <version>2.0</version>
+  <name>Maven Test Repository Artifact Discovery</name>
+  <!-- specified packaging -->
+  <packaging>jar</packaging>
+</project>
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/maven-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/repositories/delete-repository/org/apache/test/sub/samplejar/maven-metadata.xml
new file mode 100644 (file)
index 0000000..89de35f
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<metadata>
+  <groupId>org.apache.maven</groupId>
+  <artifactId>samplejar</artifactId>
+  <version>6.0-SNAPSHOT</version>
+  <versioning>
+    <release>2.0</release>
+    <latest>6.0-SNAPSHOT</latest>
+    <snapshot>
+      <buildNumber>26</buildNumber>
+    </snapshot>
+    <versions>
+      <version>6.0-SNAPSHOT</version>
+      <version>6.0-20060311.093250-41</version>
+      <version>6.0-20060311.183228-42</version>
+      <version>6.0-20060311.183228-40</version>
+      <version>6.0-20060311.183228-37</version>
+      <version>6.0-20060311.183228-30</version>
+      <version>6.0-20060311.183228-29</version>
+      <version>6.0-20060311.183228-6</version>
+      <version>6.0-20060311.183228-9</version>
+      <version>6.0-20060311.183228-10</version>
+      <version>6.0-20060313.001659-43</version>
+      <version>6.0-20060313.001659-41</version>
+      <version>6.0-20060313.001659-38</version>
+      <version>6.0-20060313.001659-31</version>
+      <version>6.0-20060313.001659-30</version>
+      <version>6.0-20060313.001659-7</version>
+      <version>6.0-20060313.001659-10</version>
+      <version>6.0-20060313.001659-11</version>
+    </versions>
+    <lastUpdated>20060313010719</lastUpdated>
+  </versioning>
+</metadata>