diff options
Diffstat (limited to 'archiva-modules/archiva-maven/archiva-maven-converter/src/test')
86 files changed, 0 insertions, 2410 deletions
diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-one.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-one.pom deleted file mode 100644 index cd3862d35..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-one.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>artifact-one</artifactId> - <version>1.0.0</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-three.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-three.pom deleted file mode 100644 index 343291037..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-three.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>artifact-three</artifactId> - <version>1.0.0</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-two.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-two.pom deleted file mode 100644 index 227470167..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-artifact-two.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>artifact-two</artifactId> - <version>1.0.0</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-snapshot.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-snapshot.pom deleted file mode 100644 index f03b5a53f..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-snapshot.pom +++ /dev/null @@ -1,29 +0,0 @@ -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>v3artifact</artifactId> - <version>1.0.0-SNAPSHOT</version> - <scm> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </scm> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.2</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-timestamped-snapshot.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-timestamped-snapshot.pom deleted file mode 100644 index 1c56340b0..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-timestamped-snapshot.pom +++ /dev/null @@ -1,29 +0,0 @@ -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>v3artifact</artifactId> - <version>1.0.0-20060105.130101-3</version> - <scm> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </scm> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.2</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-warnings.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-warnings.pom deleted file mode 100644 index bdd22765f..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3-warnings.pom +++ /dev/null @@ -1,29 +0,0 @@ -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>v3-warnings-artifact</artifactId> - <version>1.0.0</version> - <scm> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </scm> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.2</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3.pom deleted file mode 100644 index df4700c04..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/converted-v3.pom +++ /dev/null @@ -1,29 +0,0 @@ -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>v3artifact</artifactId> - <version>1.0.0</version> - <scm> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </scm> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.2</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/maven-foo-plugin-1.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/maven-foo-plugin-1.0.pom deleted file mode 100644 index 17095cc57..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/maven-foo-plugin-1.0.pom +++ /dev/null @@ -1,7 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-foo-plugin</artifactId> - <version>1.0.0</version> - <packaging>maven-plugin</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/newversion-artifact-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/newversion-artifact-metadata.xml deleted file mode 100644 index ecc7f09a0..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/newversion-artifact-metadata.xml +++ /dev/null @@ -1,10 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>newversion-artifact</artifactId> - <versioning> - <versions> - <version>1.0.0</version> - <version>1.0.1</version> - </versions> - </versioning> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/maven-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/maven-metadata.xml deleted file mode 100644 index ebd9be970..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/maven-metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ -<metadata> - <groupId>relocated-test</groupId> - <artifactId>relocated-v3artifact</artifactId> - <version>1.0.0</version> - <versioning /> -</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom deleted file mode 100644 index 3f5df2267..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom +++ /dev/null @@ -1,29 +0,0 @@ -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <groupId>relocated-test</groupId> - <artifactId>relocated-v3artifact</artifactId> - <version>1.0.0</version> - <scm> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </scm> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.2</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/maven-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/maven-metadata.xml deleted file mode 100644 index b4b1a864a..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/relocated-test/relocated-v3artifact/maven-metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ -<metadata> - <groupId>relocated-test</groupId> - <artifactId>relocated-v3artifact</artifactId> - <versioning> - <versions> - <version>1.0.0</version> - </versions> - </versioning> -</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom deleted file mode 100644 index 4efefb741..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom +++ /dev/null @@ -1,13 +0,0 @@ -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <groupId>test</groupId> - <artifactId>relocated-v3artifact</artifactId> - <version>1.0.0</version> - <distributionManagement> - <relocation> - <groupId>relocated-test</groupId> - <artifactId>relocated-v3artifact</artifactId> - <version>1.0.0</version> - </relocation> - </distributionManagement> -</project>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-artifact-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-artifact-metadata.xml deleted file mode 100644 index a8a7f3748..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-artifact-metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v3artifact</artifactId> - <versioning> - <versions> - <version>1.0.0</version> - </versions> - </versioning> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-snapshot-artifact-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-snapshot-artifact-metadata.xml deleted file mode 100644 index 24d25a0e0..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-snapshot-artifact-metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v3artifact</artifactId> - <versioning> - <versions> - <version>1.0.0-SNAPSHOT</version> - </versions> - </versioning> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-snapshot-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-snapshot-metadata.xml deleted file mode 100644 index b19c537b5..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-snapshot-metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v3artifact</artifactId> - <version>1.0.0-SNAPSHOT</version> - <versioning /> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-timestamped-snapshot-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-timestamped-snapshot-metadata.xml deleted file mode 100644 index 602c38ec8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-timestamped-snapshot-metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v3artifact</artifactId> - <version>1.0.0-SNAPSHOT</version> - <versioning> - <snapshot> - <timestamp>20060105.130101</timestamp> - <buildNumber>3</buildNumber> - </snapshot> - </versioning> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-version-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-version-metadata.xml deleted file mode 100644 index 3c8938984..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v3-version-metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v3artifact</artifactId> - <version>1.0.0</version> - <versioning /> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-artifact-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-artifact-metadata.xml deleted file mode 100644 index c0cdbfdb4..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-artifact-metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v4artifact</artifactId> - <versioning> - <versions> - <version>1.0.0</version> - </versions> - </versioning> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-snapshot-artifact-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-snapshot-artifact-metadata.xml deleted file mode 100644 index f8072b0df..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-snapshot-artifact-metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v4artifact</artifactId> - <versioning> - <versions> - <version>1.0.0-SNAPSHOT</version> - </versions> - </versioning> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-snapshot-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-snapshot-metadata.xml deleted file mode 100644 index d5ecb7d47..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-snapshot-metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v4artifact</artifactId> - <version>1.0.0-SNAPSHOT</version> - <versioning /> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-timestamped-snapshot-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-timestamped-snapshot-metadata.xml deleted file mode 100644 index 060a79cdd..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-timestamped-snapshot-metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v4artifact</artifactId> - <version>1.0.0-SNAPSHOT</version> - <versioning> - <snapshot> - <timestamp>20060111.120115</timestamp> - <buildNumber>1</buildNumber> - </snapshot> - </versioning> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-version-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-version-metadata.xml deleted file mode 100644 index 7cbd8ad3d..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/expected-files/v4-version-metadata.xml +++ /dev/null @@ -1,6 +0,0 @@ -<metadata> - <groupId>test</groupId> - <artifactId>v4artifact</artifactId> - <version>1.0.0</version> - <versioning /> -</metadata> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java deleted file mode 100644 index b52f9518e..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java +++ /dev/null @@ -1,164 +0,0 @@ -package org.apache.archiva.converter; - -/* - * 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. - */ - -import junit.framework.TestCase; -import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.converter.artifact.LegacyRepositoryLayout; -import org.apache.archiva.converter.legacy.LegacyRepositoryConverter; -import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; -import org.apache.commons.io.FileUtils; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.MavenArtifactRepository; -import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.ContextConfiguration; - -import javax.inject.Inject; -import javax.inject.Named; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; - -/** - * Test the repository converter. - * - * @todo what about deletions from the source repository? - * @todo use artifact-test instead - * @todo should reject if dependencies are missing - rely on reporting? - * @todo group metadata - */ -@RunWith( ArchivaSpringJUnit4ClassRunner.class ) -@ContextConfiguration( locations = {"classpath*:/META-INF/spring-context.xml","classpath:/spring-context.xml"} ) -public class RepositoryConverterTest - extends TestCase -{ - private ArtifactRepository sourceRepository; - - private ManagedRepositoryConfiguration targetRepository; - - @Inject - @Named(value = "legacyRepositoryConverter#default") - private LegacyRepositoryConverter repositoryConverter; - - @Inject - PlexusSisuBridge plexusSisuBridge; - - @Before - @Override - public void setUp() - throws Exception - { - super.setUp(); - - // ArtifactRepositoryFactory factory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class ); - //(ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE ); - - ArtifactRepositoryLayout layout = new LegacyRepositoryLayout(); - //(ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, "legacy" ); - - Path sourceBase = Paths.get( "src/test/source-repository" ); - sourceRepository = new MavenArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null, - null ); - - layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" ); - //(ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, "default" ); - - Path targetBase = Paths.get( "target/test-target-repository" ); - copyDirectoryStructure( Paths.get( "src/test/target-repository" ), targetBase ); - - targetRepository = new ManagedRepositoryConfiguration(); - targetRepository.setId( "target" ); - targetRepository.setName( "Target Repo" ); - targetRepository.setLocation( targetBase.toAbsolutePath().toString() ); - targetRepository.setLayout( "default" ); - - //repositoryConverter = (LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.ROLE, "default" ); - } - - @Override - protected void tearDown() - throws Exception - { - super.tearDown(); - } - - private void copyDirectoryStructure( Path sourceDirectory, Path destinationDirectory ) - throws IOException - { - if ( !Files.exists(sourceDirectory) ) - { - throw new IOException( "Source directory doesn't exists (" + sourceDirectory.toAbsolutePath() + ")." ); - } - - Path[] files = Files.list(sourceDirectory).toArray(Path[]::new); - - String sourcePath = sourceDirectory.toAbsolutePath().toString(); - - for ( int i = 0; i < files.length; i++ ) - { - Path file = files[i]; - - String dest = file.toAbsolutePath().toString(); - - dest = dest.substring( sourcePath.length() + 1 ); - - Path destination = destinationDirectory.resolve( dest ); - - if ( Files.isRegularFile(file) ) - { - destination = destination.getParent(); - - FileUtils.copyFileToDirectory( file.toFile(), destination.toFile() ); - } - else if ( Files.isDirectory(file) ) - { - if ( !".svn".equals( file.getFileName().toString() ) ) - { - if ( !Files.exists(destination)) - { - Files.createDirectories( destination ); - } - copyDirectoryStructure( file, destination ); - } - } - else - { - throw new IOException( "Unknown file type: " + file.toAbsolutePath() ); - } - } - } - - @Test - public void testLegacyConversion() - throws IOException, RepositoryConversionException - { - Path legacyRepoDir = Paths.get( sourceRepository.getBasedir() ); - Path destRepoDir = Paths.get( targetRepository.getLocation() ); - List<String> excludes = new ArrayList<>(); - repositoryConverter.convertLegacyRepository( legacyRepoDir, destRepoDir, excludes ); - } -} diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java deleted file mode 100644 index 8a4cbbca2..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java +++ /dev/null @@ -1,1050 +0,0 @@ -package org.apache.archiva.converter.artifact; - -/* - * 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. - */ - -import junit.framework.TestCase; -import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; -import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; -import org.apache.commons.io.FileUtils; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.metadata.ArtifactMetadata; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.MavenArtifactRepository; -import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; -import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.context.ApplicationContext; -import org.springframework.test.context.ContextConfiguration; - -import javax.inject.Inject; -import java.io.IOException; -import java.nio.charset.Charset; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.attribute.FileTime; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; - -/** - * LegacyToDefaultConverterTest - */ -@RunWith (ArchivaSpringJUnit4ClassRunner.class) -@ContextConfiguration (locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" }) -public class LegacyToDefaultConverterTest - extends TestCase -{ - private ArtifactRepository sourceRepository; - - private ArtifactRepository targetRepository; - - private ArtifactConverter artifactConverter; - - private ArtifactFactory artifactFactory; - - @Inject - private PlexusSisuBridge plexusSisuBridge; - - @Inject - private ApplicationContext applicationContext; - - private static final int SLEEP_MILLIS = 100; - - @Before - public void init() - throws Exception - { - super.setUp(); - - // ArtifactRepositoryFactory factory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class ); - - ArtifactRepositoryLayout layout = new LegacyRepositoryLayout(); - - Path sourceBase = getTestFile( "src/test/source-repository" ); - sourceRepository = - new MavenArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null, null ); - - layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" ); - - Path targetBase = getTestFile( "target/test-target-repository" ); - copyDirectoryStructure( getTestFile( "src/test/target-repository" ), targetBase ); - - targetRepository = - new MavenArtifactRepository( "target", targetBase.toUri().toURL().toString(), layout, null, null ); - - artifactConverter = - applicationContext.getBean( "artifactConverter#legacy-to-default", ArtifactConverter.class ); - - artifactConverter.clearWarnings(); - artifactFactory = (ArtifactFactory) plexusSisuBridge.lookup( ArtifactFactory.class ); - } - - public static Path getTestFile( String path ) - { - return Paths.get( org.apache.archiva.common.utils.FileUtils.getBasedir(), path ); - } - - private void copyDirectoryStructure( Path sourceDirectory, Path destinationDirectory ) - throws IOException - { - if ( !Files.exists(sourceDirectory) ) - { - throw new IOException( "Source directory doesn't exists (" + sourceDirectory.toAbsolutePath()+ ")." ); - } - - Path[] files = Files.list( sourceDirectory ).toArray( Path[]::new ); - - String sourcePath = sourceDirectory.toAbsolutePath().toString(); - - for ( int i = 0; i < files.length; i++ ) - { - Path file = files[i]; - - String dest = file.toAbsolutePath().toString(); - - dest = dest.substring( sourcePath.length() + 1 ); - - Path destination = destinationDirectory.resolve( dest ); - - if ( Files.isRegularFile( file ) ) - { - destination = destination.getParent(); - - FileUtils.copyFileToDirectory( file.toFile(), destination.toFile() ); - } - else if ( Files.isDirectory( file ) ) - { - if ( !".svn".equals( file.getFileName().toString() ) ) - { - if ( !Files.exists(destination)) - { - Files.createDirectories( destination ); - } - copyDirectoryStructure( file, destination ); - } - } - else - { - throw new IOException( "Unknown file type: " + file.toAbsolutePath() ); - } - } - } - - @Test - public void testV4PomConvert() - throws Exception - { - // test that it is copied as is - - Artifact artifact = createArtifact( "test", "v4artifact", "1.0.0" ); - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - Files.deleteIfExists( artifactMetadataFile); - - ArtifactMetadata versionMetadata = new SnapshotArtifactRepositoryMetadata( artifact ); - Path versionMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( versionMetadata ) ); - Files.deleteIfExists(versionMetadataFile); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Files.deleteIfExists(artifactFile); - - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - - compareFiles( sourcePomFile, pomFile ); - - assertTrue( "Check artifact metadata created", Files.exists(artifactMetadataFile) ); - - Path expectedMetadataFile = getTestFile( "src/test/expected-files/v4-artifact-metadata.xml" ); - - compareFiles( expectedMetadataFile, artifactMetadataFile ); - - assertTrue( "Check snapshot metadata created", Files.exists(versionMetadataFile) ); - - expectedMetadataFile = getTestFile( "src/test/expected-files/v4-version-metadata.xml" ); - - compareFiles( expectedMetadataFile, versionMetadataFile ); - } - - @Test - public void testV3PomConvert() - throws Exception - { - // test that the pom is coverted - - Artifact artifact = createArtifact( "test", "v3artifact", "1.0.0" ); - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - Files.deleteIfExists(artifactMetadataFile); - - ArtifactMetadata versionMetadata = new SnapshotArtifactRepositoryMetadata( artifact ); - Path versionMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( versionMetadata ) ); - Files.deleteIfExists(versionMetadataFile); - - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path expectedPomFile = getTestFile( "src/test/expected-files/converted-v3.pom" ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - - compareFiles( expectedPomFile, pomFile ); - - assertTrue( "Check artifact metadata created", Files.exists(artifactMetadataFile) ); - - Path expectedMetadataFile = getTestFile( "src/test/expected-files/v3-artifact-metadata.xml" ); - - compareFiles( expectedMetadataFile, artifactMetadataFile ); - - assertTrue( "Check snapshot metadata created", Files.exists(versionMetadataFile) ); - - expectedMetadataFile = getTestFile( "src/test/expected-files/v3-version-metadata.xml" ); - - compareFiles( expectedMetadataFile, versionMetadataFile ); - } - - @Test - public void testV3PomConvertWithRelocation() - throws Exception - { - Artifact artifact = createArtifact( "test", "relocated-v3artifact", "1.0.0" ); - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - Files.deleteIfExists(artifactMetadataFile); - - ArtifactMetadata versionMetadata = new SnapshotArtifactRepositoryMetadata( artifact ); - Path versionMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( versionMetadata ) ); - Files.deleteIfExists(versionMetadataFile); - - artifactConverter.convert( artifact, targetRepository ); - //checkSuccess(); --> commented until MNG-2100 is fixed - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check if relocated artifact created", Files.exists(artifactFile) ); - assertTrue( "Check if relocated artifact matches", - FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - Artifact pomArtifact = createArtifact( "relocated-test", "relocated-v3artifact", "1.0.0", "1.0.0", "pom" ); - Path pomFile = getTestFile( "src/test/expected-files/" + targetRepository.pathOf( pomArtifact ) ); - Path testFile = getTestFile( "target/test-target-repository/" + targetRepository.pathOf( pomArtifact ) ); - compareFiles( pomFile, testFile ); - - Artifact orig = createArtifact( "test", "relocated-v3artifact", "1.0.0", "1.0.0", "pom" ); - artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( orig ) ); - assertTrue( "Check if relocation artifact pom is created", Files.exists(artifactFile) ); - testFile = getTestFile( "src/test/expected-files/" + targetRepository.pathOf( orig ) ); - compareFiles( artifactFile, testFile ); - } - - @Test - public void testV3PomWarningsOnConvert() - throws Exception - { - // test that the pom is converted but that warnings are reported - - Artifact artifact = createArtifact( "test", "v3-warnings-artifact", "1.0.0" ); - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - Files.deleteIfExists(artifactMetadataFile); - - ArtifactMetadata versionMetadata = new SnapshotArtifactRepositoryMetadata( artifact ); - Path versionMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( versionMetadata ) ); - Files.deleteIfExists(versionMetadataFile); - - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 2 ); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path expectedPomFile = getTestFile( "src/test/expected-files/converted-v3-warnings.pom" ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - - compareFiles( expectedPomFile, pomFile ); - - // TODO: check 2 warnings (extend and versions) matched on i18n key - } - - private void doTestV4SnapshotPomConvert( String version, String expectedMetadataFileName ) - throws Exception - { - // test that it is copied as is - - Artifact artifact = createArtifact( "test", "v4artifact", version ); - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - Files.deleteIfExists(artifactMetadataFile); - - ArtifactMetadata snapshotMetadata = new SnapshotArtifactRepositoryMetadata( artifact ); - Path snapshotMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( snapshotMetadata ) ); - Files.deleteIfExists(snapshotMetadataFile); - - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - - compareFiles( sourcePomFile, pomFile ); - - assertTrue( "Check artifact metadata created", Files.exists(artifactMetadataFile) ); - - Path expectedMetadataFile = getTestFile( "src/test/expected-files/v4-snapshot-artifact-metadata.xml" ); - - compareFiles( expectedMetadataFile, artifactMetadataFile ); - - assertTrue( "Check snapshot metadata created", Files.exists(snapshotMetadataFile) ); - - expectedMetadataFile = getTestFile( expectedMetadataFileName ); - - compareFiles( expectedMetadataFile, snapshotMetadataFile ); - } - - @Test - public void testV3SnapshotPomConvert() - throws Exception - { - // test that the pom is coverted - - Artifact artifact = createArtifact( "test", "v3artifact", "1.0.0-SNAPSHOT" ); - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - Files.deleteIfExists(artifactMetadataFile); - - ArtifactMetadata snapshotMetadata = new SnapshotArtifactRepositoryMetadata( artifact ); - Path snapshotMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( snapshotMetadata ) ); - Files.deleteIfExists(snapshotMetadataFile); - - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path expectedPomFile = getTestFile( "src/test/expected-files/converted-v3-snapshot.pom" ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - - compareFiles( expectedPomFile, pomFile ); - - assertTrue( "Check artifact metadata created", Files.exists(artifactMetadataFile) ); - - Path expectedMetadataFile = getTestFile( "src/test/expected-files/v3-snapshot-artifact-metadata.xml" ); - - compareFiles( expectedMetadataFile, artifactMetadataFile ); - - assertTrue( "Check snapshot metadata created", Files.exists(snapshotMetadataFile) ); - - expectedMetadataFile = getTestFile( "src/test/expected-files/v3-snapshot-metadata.xml" ); - - compareFiles( expectedMetadataFile, snapshotMetadataFile ); - } - - @Test - public void testV4SnapshotPomConvert() - throws Exception - { - doTestV4SnapshotPomConvert( "1.0.0-SNAPSHOT", "src/test/expected-files/v4-snapshot-metadata.xml" ); - - assertTrue( true ); - } - - @Test - public void testV4TimestampedSnapshotPomConvert() - throws Exception - { - doTestV4SnapshotPomConvert( "1.0.0-20060111.120115-1", - "src/test/expected-files/v4-timestamped-snapshot-metadata.xml" ); - - assertTrue( true ); - } - - @Test - public void testMavenOnePluginConversion() - throws Exception - { - Artifact artifact = - createArtifact( "org.apache.maven.plugins", "maven-foo-plugin", "1.0", "1.0", "maven-plugin" ); - artifact.setFile( - Paths.get( org.apache.archiva.common.utils.FileUtils.getBasedir(), "src/test/source-repository/test/plugins/maven-foo-plugin-1.0.jar" ).toFile() ); - artifactConverter.convert( artifact, targetRepository ); - // There is a warning but I can't figure out how to look at it. Eyeballing the results it appears - // the plugin is being coverted correctly. - //checkSuccess(); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - /* - The POM isn't needed for Maven 1.x plugins but the raw conversion for - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - File expectedPomFile = getTestFile( "src/test/expected-files/maven-foo-plugin-1.0.pom" ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - compareFiles( expectedPomFile, pomFile ); - */ - } - - @Test - public void testV3TimestampedSnapshotPomConvert() - throws Exception - { - // test that the pom is coverted - - Artifact artifact = createArtifact( "test", "v3artifact", "1.0.0-20060105.130101-3" ); - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - Files.deleteIfExists(artifactMetadataFile); - - ArtifactMetadata snapshotMetadata = new SnapshotArtifactRepositoryMetadata( artifact ); - Path snapshotMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( snapshotMetadata ) ); - Files.deleteIfExists(snapshotMetadataFile); - - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path expectedPomFile = getTestFile( "src/test/expected-files/converted-v3-timestamped-snapshot.pom" ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - - compareFiles( expectedPomFile, pomFile ); - - assertTrue( "Check artifact snapshotMetadata created", Files.exists(artifactMetadataFile) ); - - Path expectedMetadataFile = getTestFile( "src/test/expected-files/v3-snapshot-artifact-metadata.xml" ); - - compareFiles( expectedMetadataFile, artifactMetadataFile ); - - assertTrue( "Check snapshot snapshotMetadata created", Files.exists(snapshotMetadataFile) ); - - expectedMetadataFile = getTestFile( "src/test/expected-files/v3-timestamped-snapshot-metadata.xml" ); - - compareFiles( expectedMetadataFile, snapshotMetadataFile ); - } - - @Test - public void testNoPomConvert() - throws Exception - { - // test that a POM is not created when there was none at the source - - Artifact artifact = createArtifact( "test", "noPomArtifact", "1.0.0" ); - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 1 ); - - assertHasWarningReason( artifactConverter, Messages.getString( "warning.missing.pom" ) ); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - - assertFalse( "Check no POM created", Files.exists(pomFile) ); - assertFalse( "No source POM", Files.exists(sourcePomFile) ); - } - - @Test - public void testIncorrectSourceChecksumMd5() - throws Exception - { - // test that it fails when the source md5 is wrong - - Artifact artifact = createArtifact( "test", "incorrectMd5Artifact", "1.0.0" ); - Path file = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Files.deleteIfExists(file); - - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 2 ); - - assertHasWarningReason( artifactConverter, Messages.getString( "failure.incorrect.md5" ) ); - - assertFalse( "Check artifact not created", Files.exists(file) ); - - ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); - Path metadataFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOfRemoteRepositoryMetadata( metadata ) ); - assertFalse( "Check metadata not created", Files.exists(metadataFile) ); - } - - @Test - public void testIncorrectSourceChecksumSha1() - throws Exception - { - // test that it fails when the source sha1 is wrong - - Artifact artifact = createArtifact( "test", "incorrectSha1Artifact", "1.0.0" ); - Path file = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Files.deleteIfExists(file); - - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 2 ); - - assertHasWarningReason( artifactConverter, Messages.getString( "failure.incorrect.sha1" ) ); - - assertFalse( "Check artifact not created", Files.exists(file) ); - - ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); - Path metadataFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOfRemoteRepositoryMetadata( metadata ) ); - assertFalse( "Check metadata not created", Files.exists(metadataFile) ); - } - - @Test - public void testUnmodifiedArtifact() - throws Exception, InterruptedException - { - // test the unmodified artifact is untouched - - Artifact artifact = createArtifact( "test", "unmodified-artifact", "1.0.0" ); - Artifact pomArtifact = createPomArtifact( artifact ); - - Path sourceFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( pomArtifact ) ); - Path targetFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path targetPomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( pomArtifact ) ); - - assertTrue( "Check target file exists", Files.exists(targetFile) ); - assertTrue( "Check target POM exists", Files.exists(targetPomFile) ); - - Files.setLastModifiedTime( sourceFile, FileTime.from(System.currentTimeMillis(), TimeUnit.MILLISECONDS) ); - Files.setLastModifiedTime( sourcePomFile, FileTime.from(System.currentTimeMillis(), TimeUnit.MILLISECONDS) ); - - long origTime = Files.getLastModifiedTime( targetFile ).toMillis(); - long origPomTime = Files.getLastModifiedTime( targetPomFile ).toMillis(); - - // Need to guarantee last modified is not equal - Thread.sleep( SLEEP_MILLIS ); - - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - compareFiles( sourceFile, targetFile ); - compareFiles( sourcePomFile, targetPomFile ); - - assertEquals( "Check artifact unmodified", origTime, Files.getLastModifiedTime( targetFile ).toMillis() ); - assertEquals( "Check POM unmodified", origPomTime, Files.getLastModifiedTime( targetPomFile ).toMillis() ); - } - - @Test - public void testModifedArtifactFails() - throws Exception - { - // test that it fails when the source artifact has changed and is different to the existing artifact in the - // target repository - - Artifact artifact = createArtifact( "test", "modified-artifact", "1.0.0" ); - Artifact pomArtifact = createPomArtifact( artifact ); - - Path sourceFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( pomArtifact ) ); - Path targetFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path targetPomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( pomArtifact ) ); - - assertTrue( "Check target file exists", Files.exists(targetFile) ); - assertTrue( "Check target POM exists", Files.exists(targetPomFile) ); - - Files.setLastModifiedTime(sourceFile, FileTime.from(System.currentTimeMillis() , TimeUnit.MILLISECONDS)); - Files.setLastModifiedTime(sourcePomFile, FileTime.from(System.currentTimeMillis() , TimeUnit.MILLISECONDS)); - - long origTime = Files.getLastModifiedTime(targetFile).toMillis(); - long origPomTime = Files.getLastModifiedTime(targetPomFile).toMillis(); - - // Need to guarantee last modified is not equal - Thread.sleep( SLEEP_MILLIS ); - - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 2 ); - - assertHasWarningReason( artifactConverter, Messages.getString( "failure.target.already.exists" ) ); - - assertEquals( "Check unmodified", origTime, Files.getLastModifiedTime(targetFile).toMillis() ); - assertEquals( "Check unmodified", origPomTime, Files.getLastModifiedTime(targetPomFile).toMillis() ); - - ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); - Path metadataFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOfRemoteRepositoryMetadata( metadata ) ); - assertFalse( "Check metadata not created", Files.exists(metadataFile) ); - } - - @Test - public void testForcedUnmodifiedArtifact() - throws Exception - { - // test unmodified artifact is still converted when set to force - - artifactConverter = - applicationContext.getBean( "artifactConverter#force-repository-converter", ArtifactConverter.class ); - - Artifact artifact = createArtifact( "test", "unmodified-artifact", "1.0.0" ); - Artifact pomArtifact = createPomArtifact( artifact ); - - Path sourceFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( pomArtifact ) ); - Path targetFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path targetPomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( pomArtifact ) ); - - SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd", Locale.getDefault() ); - long origTime = dateFormat.parse( "2006-03-03" ).getTime(); - Files.setLastModifiedTime(targetFile, FileTime.from(origTime , TimeUnit.MILLISECONDS)); - Files.setLastModifiedTime(targetPomFile, FileTime.from(origTime , TimeUnit.MILLISECONDS)); - - Files.setLastModifiedTime(sourceFile, FileTime.from(dateFormat.parse( "2006-01-01" ).getTime() , TimeUnit.MILLISECONDS)); - Files.setLastModifiedTime(sourcePomFile, FileTime.from(dateFormat.parse( "2006-02-02" ).getTime() , TimeUnit.MILLISECONDS)); - - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - compareFiles( sourceFile, targetFile ); - compareFiles( sourcePomFile, targetPomFile ); - - assertFalse( "Check modified", origTime == Files.getLastModifiedTime(targetFile).toMillis() ); - assertFalse( "Check modified", origTime == Files.getLastModifiedTime(targetPomFile).toMillis() ); - - ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); - Path metadataFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOfRemoteRepositoryMetadata( metadata ) ); - assertTrue( "Check metadata created", Files.exists(metadataFile) ); - } - - @Test - public void testDryRunSuccess() - throws Exception - { - // test dry run does nothing on a run that will be successful, and returns success - - artifactConverter = - applicationContext.getBean( "artifactConverter#dryrun-repository-converter", ArtifactConverter.class ); - - Artifact artifact = createArtifact( "test", "dryrun-artifact", "1.0.0" ); - Artifact pomArtifact = createPomArtifact( artifact ); - - Path sourceFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( pomArtifact ) ); - Path targetFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path targetPomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( pomArtifact ) ); - - // clear warning before test related to MRM-1638 - artifactConverter.clearWarnings(); - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - assertTrue( "Check source file exists", Files.exists(sourceFile) ); - assertTrue( "Check source POM exists", Files.exists(sourcePomFile) ); - - assertFalse( "Check target file doesn't exist", Files.exists(targetFile) ); - assertFalse( "Check target POM doesn't exist", Files.exists(targetPomFile) ); - - ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); - Path metadataFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOfRemoteRepositoryMetadata( metadata ) ); - assertFalse( "Check metadata not created", Files.exists(metadataFile) ); - } - - @Test - public void testDryRunFailure() - throws Exception - { - // test dry run does nothing on a run that will fail, and returns failure - - artifactConverter = - applicationContext.getBean( "artifactConverter#dryrun-repository-converter", ArtifactConverter.class ); - - Artifact artifact = createArtifact( "test", "modified-artifact", "1.0.0" ); - Artifact pomArtifact = createPomArtifact( artifact ); - - Path sourceFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( pomArtifact ) ); - Path targetFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path targetPomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( pomArtifact ) ); - - assertTrue( "Check target file exists", Files.exists(targetFile) ); - assertTrue( "Check target POM exists", Files.exists(targetPomFile) ); - - Files.setLastModifiedTime(sourceFile, FileTime.from(System.currentTimeMillis() , TimeUnit.MILLISECONDS)); - Files.setLastModifiedTime(sourcePomFile, FileTime.from(System.currentTimeMillis() , TimeUnit.MILLISECONDS)); - - long origTime = Files.getLastModifiedTime(targetFile).toMillis(); - long origPomTime = Files.getLastModifiedTime(targetPomFile).toMillis(); - - // Need to guarantee last modified is not equal - Thread.sleep( SLEEP_MILLIS ); - - // clear warning before test related to MRM-1638 - artifactConverter.clearWarnings(); - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 2 ); - - assertHasWarningReason( artifactConverter, Messages.getString( "failure.target.already.exists" ) ); - - assertEquals( "Check unmodified", origTime, Files.getLastModifiedTime(targetFile).toMillis() ); - assertEquals( "Check unmodified", origPomTime, Files.getLastModifiedTime(targetPomFile).toMillis() ); - - ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); - Path metadataFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOfRemoteRepositoryMetadata( metadata ) ); - assertFalse( "Check metadata not created", Files.exists(metadataFile) ); - } - - @Test - public void testRollbackArtifactCreated() - throws Exception - { - // test rollback can remove a created artifact, including checksums - - Artifact artifact = createArtifact( "test", "rollback-created-artifact", "1.0.0" ); - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - org.apache.archiva.common.utils.FileUtils.deleteDirectory( artifactMetadataFile.getParent() ); - - ArtifactMetadata versionMetadata = new SnapshotArtifactRepositoryMetadata( artifact ); - Path versionMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( versionMetadata ) ); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 2 ); - - boolean found = false; - String pattern = "^" + Messages.getString( "invalid.source.pom" ).replaceFirst( "\\{0\\}", ".*" ) + "$"; - for ( List<String> messages : artifactConverter.getWarnings().values() ) - { - for ( String message : messages ) - { - if ( message.matches( pattern ) ) - { - found = true; - break; - } - } - - if ( found ) - { - break; - } - } - - assertTrue( "Check failure message.", found ); - - assertFalse( "check artifact rolled back", Files.exists(artifactFile) ); - assertFalse( "check metadata rolled back", Files.exists(artifactMetadataFile) ); - assertFalse( "check metadata rolled back", Files.exists(versionMetadataFile) ); - } - - @Test - public void testMultipleArtifacts() - throws Exception - { - // test multiple artifacts are converted - - List<Artifact> artifacts = new ArrayList<>(); - artifacts.add( createArtifact( "test", "artifact-one", "1.0.0" ) ); - artifacts.add( createArtifact( "test", "artifact-two", "1.0.0" ) ); - artifacts.add( createArtifact( "test", "artifact-three", "1.0.0" ) ); - - for ( Artifact artifact : artifacts ) - { - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - } - - for ( Artifact artifact : artifacts ) - { - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path expectedPomFile = - getTestFile( "src/test/expected-files/converted-" + artifact.getArtifactId() + ".pom" ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - - compareFiles( expectedPomFile, pomFile ); - } - } - - @Test - public void testInvalidSourceArtifactMetadata() - throws Exception - { - // test artifact is not converted when source metadata is invalid, and returns failure - - createModernSourceRepository(); - - Artifact artifact = createArtifact( "test", "incorrectArtifactMetadata", "1.0.0" ); - Path file = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Files.deleteIfExists(file); - - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 2 ); - - assertHasWarningReason( artifactConverter, - Messages.getString( "failure.incorrect.artifactMetadata.versions" ) ); - - assertFalse( "Check artifact not created", Files.exists(file) ); - - ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); - Path metadataFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOfRemoteRepositoryMetadata( metadata ) ); - assertFalse( "Check metadata not created", Files.exists(metadataFile) ); - } - - @Test - public void testInvalidSourceSnapshotMetadata() - throws Exception - { - // test artifact is not converted when source snapshot metadata is invalid and returns failure - - createModernSourceRepository(); - - Artifact artifact = createArtifact( "test", "incorrectSnapshotMetadata", "1.0.0-20060102.030405-6" ); - Path file = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Files.deleteIfExists(file); - - artifactConverter.convert( artifact, targetRepository ); - checkWarnings( artifactConverter, 2 ); - - assertHasWarningReason( artifactConverter, - Messages.getString( "failure.incorrect.snapshotMetadata.snapshot" ) ); - - assertFalse( "Check artifact not created", Files.exists(file) ); - - ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); - Path metadataFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOfRemoteRepositoryMetadata( metadata ) ); - assertFalse( "Check metadata not created", Files.exists(metadataFile) ); - } - - @Test - public void testMergeArtifactMetadata() - throws Exception - { - // test artifact level metadata is merged when it already exists on successful conversion - - Artifact artifact = createArtifact( "test", "newversion-artifact", "1.0.1" ); - artifactConverter.convert( artifact, targetRepository ); - checkSuccess( artifactConverter ); - - Path artifactFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - assertTrue( "Check artifact created", Files.exists(artifactFile) ); - assertTrue( "Check artifact matches", FileUtils.contentEquals( artifactFile.toFile(), artifact.getFile() ) ); - - artifact = createPomArtifact( artifact ); - Path pomFile = Paths.get( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); - Path sourcePomFile = Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ); - assertTrue( "Check POM created", Files.exists(pomFile) ); - - compareFiles( sourcePomFile, pomFile ); - - ArtifactMetadata artifactMetadata = new ArtifactRepositoryMetadata( artifact ); - Path artifactMetadataFile = Paths.get( targetRepository.getBasedir(), - targetRepository.pathOfRemoteRepositoryMetadata( artifactMetadata ) ); - assertTrue( "Check artifact metadata created", Files.exists(artifactMetadataFile) ); - - Path expectedMetadataFile = getTestFile( "src/test/expected-files/newversion-artifact-metadata.xml" ); - - compareFiles( expectedMetadataFile, artifactMetadataFile ); - } - - @Test - public void testSourceAndTargetRepositoriesMatch() - throws Exception - { - // test that it fails if the same - - - sourceRepository = - new MavenArtifactRepository( "source", targetRepository.getUrl(), targetRepository.getLayout(), null, - null ); - - Artifact artifact = createArtifact( "test", "repository-artifact", "1.0" ); - - try - { - artifactConverter.convert( artifact, targetRepository ); - fail( "Should have failed trying to convert within the same repository" ); - } - catch ( ArtifactConversionException e ) - { - // expected - assertEquals( "check message", Messages.getString( "exception.repositories.match" ), e.getMessage() ); - assertNull( "Check no additional cause", e.getCause() ); - } - } - - private Artifact createArtifact( String groupId, String artifactId, String version ) - { - Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher( version ); - String baseVersion; - if ( matcher.matches() ) - { - baseVersion = matcher.group( 1 ) + "-SNAPSHOT"; - } - else - { - baseVersion = version; - } - return createArtifact( groupId, artifactId, baseVersion, version, "jar" ); - } - - private Artifact createArtifact( String groupId, String artifactId, String baseVersion, String version, - String type ) - { - Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, version, null, type ); - artifact.setBaseVersion( baseVersion ); - artifact.setRepository( sourceRepository ); - artifact.setFile( Paths.get( sourceRepository.getBasedir(), sourceRepository.pathOf( artifact ) ).toFile() ); - return artifact; - } - - private Artifact createPomArtifact( Artifact artifact ) - { - return createArtifact( artifact.getGroupId(), artifact.getArtifactId(), artifact.getBaseVersion(), - artifact.getVersion(), "pom" ); - } - - private static void compareFiles( Path expectedPomFile, Path pomFile ) - throws IOException - { - String expectedContent = normalizeString( - org.apache.archiva.common.utils.FileUtils.readFileToString( expectedPomFile, Charset.defaultCharset() ) ); - String targetContent = - normalizeString( org.apache.archiva.common.utils.FileUtils.readFileToString( pomFile, Charset.defaultCharset() ) ); - assertEquals( "Check file match between " + expectedPomFile + " and " + pomFile, expectedContent, - targetContent ); - } - - private static String normalizeString( String path ) - { - return path.trim().replaceAll( "\r\n", "\n" ).replace( '\r', '\n' ).replaceAll( "<\\?xml .+\\?>", - "" ).replaceAll( "^\\s+", "" ); - } - - private void checkSuccess( ArtifactConverter converter ) - { - assertNotNull( "Warnings should never be null.", converter.getWarnings() ); - assertEquals( "Should have no warnings. " + converter.getWarnings(), 0, countWarningMessages( converter ) ); - } - - private void checkWarnings( ArtifactConverter converter, int count ) - { - assertNotNull( "Warnings should never be null.", converter.getWarnings() ); - assertEquals( "Should have some warnings.", count, countWarningMessages( converter ) ); - } - - private int countWarningMessages( ArtifactConverter converter ) - { - int count = 0; - for ( List<String> values : converter.getWarnings().values() ) - { - count += values.size(); - } - return count; - } - - private void assertHasWarningReason( ArtifactConverter converter, String reason ) - { - assertNotNull( "Warnings should never be null.", converter.getWarnings() ); - assertTrue( "Expecting 1 or more Warnings", countWarningMessages( converter ) > 0 ); - - for ( List<String> messages : converter.getWarnings().values() ) - { - if ( messages.contains( reason ) ) - { - /* No need to check any further */ - return; - } - } - - /* didn't find it. */ - - for ( Map.Entry<Artifact, List<String>> entry : converter.getWarnings().entrySet() ) - { - Artifact artifact = (Artifact) entry.getKey(); - System.out.println( - "-Artifact: " + artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion() ); - List<String> messages = entry.getValue(); - for ( String message : messages ) - { - System.out.println( " " + message ); - } - } - fail( "Unable to find message <" + reason + "> in warnings." ); - } - - private void createModernSourceRepository() - throws Exception - { - ArtifactRepositoryLayout layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" ); - - Path sourceBase = getTestFile( "src/test/source-modern-repository" ); - sourceRepository = - new MavenArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null, null ); - } -} diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/mock/MockArchivaAdministration.java b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/mock/MockArchivaAdministration.java deleted file mode 100644 index c00189493..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/java/org/apache/archiva/converter/mock/MockArchivaAdministration.java +++ /dev/null @@ -1,199 +0,0 @@ -package org.apache.archiva.converter.mock; -/* - * 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. - */ - -import org.apache.archiva.admin.model.AuditInformation; -import org.apache.archiva.admin.model.RepositoryAdminException; -import org.apache.archiva.admin.model.admin.ArchivaAdministration; -import org.apache.archiva.admin.model.beans.FileType; -import org.apache.archiva.admin.model.beans.LegacyArtifactPath; -import org.apache.archiva.admin.model.beans.NetworkConfiguration; -import org.apache.archiva.admin.model.beans.OrganisationInformation; -import org.apache.archiva.admin.model.beans.UiConfiguration; - -import java.util.List; - -/** - * @author Olivier Lamy - */ -public class MockArchivaAdministration - implements ArchivaAdministration -{ - @Override - public List<LegacyArtifactPath> getLegacyArtifactPaths() - throws RepositoryAdminException - { - return null; - } - - @Override - public void addLegacyArtifactPath( LegacyArtifactPath legacyArtifactPath, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public void deleteLegacyArtifactPath( String path, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public void addFileTypePattern( String fileTypeId, String pattern, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public void removeFileTypePattern( String fileTypeId, String pattern, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public List<FileType> getFileTypes() - throws RepositoryAdminException - { - return null; - } - - @Override - public FileType getFileType( String fileTypeId ) - throws RepositoryAdminException - { - return null; - } - - @Override - public void addFileType( FileType fileType, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public void removeFileType( String fileTypeId, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public void addKnownContentConsumer( String knownContentConsumer, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public void setKnownContentConsumers( List<String> knownContentConsumers, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public List<String> getKnownContentConsumers() - throws RepositoryAdminException - { - return null; - } - - @Override - public void removeKnownContentConsumer( String knownContentConsumer, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public void addInvalidContentConsumer( String invalidContentConsumer, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public void setInvalidContentConsumers( List<String> invalidContentConsumers, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public List<String> getInvalidContentConsumers() - throws RepositoryAdminException - { - return null; - } - - @Override - public void removeInvalidContentConsumer( String invalidContentConsumer, AuditInformation auditInformation ) - throws RepositoryAdminException - { - - } - - @Override - public OrganisationInformation getOrganisationInformation() - throws RepositoryAdminException - { - return null; - } - - @Override - public void setOrganisationInformation( OrganisationInformation organisationInformation ) - throws RepositoryAdminException - { - - - } - - @Override - public UiConfiguration getUiConfiguration() - throws RepositoryAdminException - { - return null; - } - - @Override - public void updateUiConfiguration( UiConfiguration uiConfiguration ) - throws RepositoryAdminException - { - - } - - @Override - public NetworkConfiguration getNetworkConfiguration() - throws RepositoryAdminException - { - return null; - } - - @Override - public void setNetworkConfiguration( NetworkConfiguration networkConfiguration ) - throws RepositoryAdminException - { - - } -} diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/resources/spring-context.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/resources/spring-context.xml deleted file mode 100644 index 69187cb7c..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/resources/spring-context.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> - -<!-- - ~ 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. - --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> - - <bean name="artifactConverter#force-repository-converter" class="org.apache.archiva.converter.artifact.LegacyToDefaultConverter"> - <property name="force" value="true"/> - <property name="dryrun" value="false"/> - </bean> - - <bean name="artifactConverter#dryrun-repository-converter" class="org.apache.archiva.converter.artifact.LegacyToDefaultConverter"> - <property name="force" value="false"/> - <property name="dryrun" value="true"/> - </bean> - - <bean name="mockArchivaAdministration" class="org.apache.archiva.converter.mock.MockArchivaAdministration"/> - -</beans>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/1.0.0/incorrectArtifactMetadata-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/1.0.0/incorrectArtifactMetadata-1.0.0.jar deleted file mode 100644 index 72af4bc10..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/1.0.0/incorrectArtifactMetadata-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -incorrectMd5 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/1.0.0/incorrectArtifactMetadata-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/1.0.0/incorrectArtifactMetadata-1.0.0.pom deleted file mode 100644 index b64e1d0f0..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/1.0.0/incorrectArtifactMetadata-1.0.0.pom +++ /dev/null @@ -1,25 +0,0 @@ -<!-- - ~ 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> - <pomVersion>3</pomVersion> - <artifactId>incorrectArtifactMetadata</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/maven-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/maven-metadata.xml deleted file mode 100644 index b393bcd3d..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectArtifactMetadata/maven-metadata.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - ~ 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. - --> - -<metadata> - <groupId>test</groupId> - <artifactId>incorrectArtifactMetadata</artifactId> - <versioning> - <versions> - <version>0.9</version> - </versions> - </versioning> -</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/incorrectSnapshotMetadata-1.0.0-20060102.030405-6.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/incorrectSnapshotMetadata-1.0.0-20060102.030405-6.jar deleted file mode 100644 index 72af4bc10..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/incorrectSnapshotMetadata-1.0.0-20060102.030405-6.jar +++ /dev/null @@ -1 +0,0 @@ -incorrectMd5 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/incorrectSnapshotMetadata-1.0.0-20060102.030405-6.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/incorrectSnapshotMetadata-1.0.0-20060102.030405-6.pom deleted file mode 100644 index 929190af2..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/incorrectSnapshotMetadata-1.0.0-20060102.030405-6.pom +++ /dev/null @@ -1,25 +0,0 @@ -<!-- - ~ 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> - <pomVersion>3</pomVersion> - <artifactId>incorrectSnapshotMetadata</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0-20060102.030405-6</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/maven-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/maven-metadata.xml deleted file mode 100644 index 5980278b3..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/1.0.0-SNAPSHOT/maven-metadata.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - ~ 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. - --> - -<metadata> - <groupId>test</groupId> - <artifactId>incorrectSnapshotMetadata</artifactId> - <version>1.0.0-SNAPSHOT</version> - <versioning> - <snapshot> - <buildNumber>10</buildNumber> - <timestamp>20060102.040506</timestamp> - </snapshot> - </versioning> -</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/maven-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/maven-metadata.xml deleted file mode 100644 index 3f9a0cef2..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-modern-repository/test/incorrectSnapshotMetadata/maven-metadata.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - ~ 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. - --> - -<metadata> - <groupId>test</groupId> - <artifactId>incorrectSnapshotMetadata</artifactId> - <versioning> - <versions> - <version>1.0.0-SNAPSHOT</version> - </versions> - </versioning> -</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-one-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-one-1.0.0.jar deleted file mode 100644 index 5626abf0f..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-one-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -one diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-three-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-three-1.0.0.jar deleted file mode 100644 index 2bdf67abb..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-three-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -three diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-two-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-two-1.0.0.jar deleted file mode 100644 index f719efd43..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/artifact-two-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -two diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/dryrun-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/dryrun-artifact-1.0.0.jar deleted file mode 100644 index cbaf024e5..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/dryrun-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -existing diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/existing-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/existing-artifact-1.0.0.jar deleted file mode 100644 index cbaf024e5..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/existing-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -existing diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectMd5Artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectMd5Artifact-1.0.0.jar deleted file mode 100644 index 72af4bc10..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectMd5Artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -incorrectMd5 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectMd5Artifact-1.0.0.jar.md5 b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectMd5Artifact-1.0.0.jar.md5 deleted file mode 100644 index 316d9a4eb..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectMd5Artifact-1.0.0.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -379dcfcd1e6312cc859111f696047eb4 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectSha1Artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectSha1Artifact-1.0.0.jar deleted file mode 100644 index f5812f3e5..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectSha1Artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -incorrectSha1 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectSha1Artifact-1.0.0.jar.sha1 b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectSha1Artifact-1.0.0.jar.sha1 deleted file mode 100644 index cce322eb2..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/incorrectSha1Artifact-1.0.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -52e07b82d944741f66bba5896d4cd74e9879e289 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/modified-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/modified-artifact-1.0.0.jar deleted file mode 100644 index 2e0996000..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/modified-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -modified diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/newversion-artifact-1.0.1.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/newversion-artifact-1.0.1.jar deleted file mode 100644 index c694117fd..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/newversion-artifact-1.0.1.jar +++ /dev/null @@ -1 +0,0 @@ -v4 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/noPomArtifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/noPomArtifact-1.0.0.jar deleted file mode 100644 index 3d27acdcc..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/noPomArtifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -noPom diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/relocated-v3artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/relocated-v3artifact-1.0.0.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/relocated-v3artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/rollback-created-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/rollback-created-artifact-1.0.0.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/rollback-created-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/unmodified-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/unmodified-artifact-1.0.0.jar deleted file mode 100644 index 27597bc21..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/unmodified-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -unmodified diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3-warnings-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3-warnings-artifact-1.0.0.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3-warnings-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0-20060105.130101-3.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0-20060105.130101-3.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0-20060105.130101-3.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0-SNAPSHOT.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0-SNAPSHOT.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0-SNAPSHOT.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v3artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0-20060111.120115-1.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0-20060111.120115-1.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0-20060111.120115-1.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0-SNAPSHOT.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0-SNAPSHOT.jar deleted file mode 100644 index 29ef827e8..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0-SNAPSHOT.jar +++ /dev/null @@ -1 +0,0 @@ -v3 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar deleted file mode 100644 index c694117fd..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -v4 diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar.md5 b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar.md5 deleted file mode 100644 index 1930bc6d3..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -4289bbdd6fba75013b317b2f9a540736 *v4artifact-1.0.0.jar diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar.sha1 b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar.sha1 deleted file mode 100644 index 466f209a7..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/jars/v4artifact-1.0.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e3e4159da65a4257f0bffb7cac8e3e78241a4dca *v4artifact-1.0.0.jar diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/plugins/maven-foo-plugin-1.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/plugins/maven-foo-plugin-1.0.jar deleted file mode 100644 index 5626abf0f..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/plugins/maven-foo-plugin-1.0.jar +++ /dev/null @@ -1 +0,0 @@ -one diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-one-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-one-1.0.0.pom deleted file mode 100644 index cd3862d35..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-one-1.0.0.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>artifact-one</artifactId> - <version>1.0.0</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-three-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-three-1.0.0.pom deleted file mode 100644 index 343291037..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-three-1.0.0.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>artifact-three</artifactId> - <version>1.0.0</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-two-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-two-1.0.0.pom deleted file mode 100644 index 227470167..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/artifact-two-1.0.0.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>artifact-two</artifactId> - <version>1.0.0</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/dryrun-artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/dryrun-artifact-1.0.0.pom deleted file mode 100644 index 1953c5523..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/dryrun-artifact-1.0.0.pom +++ /dev/null @@ -1,22 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <modelVersion>4.0.0</modelVersion> - <artifactId>dryrun-artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/incorrectMd5Artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/incorrectMd5Artifact-1.0.0.pom deleted file mode 100644 index 74d5e12b4..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/incorrectMd5Artifact-1.0.0.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <pomVersion>3</pomVersion> - <artifactId>incorrectMd5Artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/incorrectSha1Artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/incorrectSha1Artifact-1.0.0.pom deleted file mode 100644 index fe3c7fd91..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/incorrectSha1Artifact-1.0.0.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <pomVersion>3</pomVersion> - <artifactId>incorrectSha1Artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/maven-foo-plugin-1.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/maven-foo-plugin-1.0.pom deleted file mode 100644 index a5a02c42d..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/maven-foo-plugin-1.0.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <pomVersion>3</pomVersion> - <artifactId>maven-foo-plugin</artifactId> - <groupId>org.apache.maven.plugins</groupId> - <currentVersion>1.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/modified-artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/modified-artifact-1.0.0.pom deleted file mode 100644 index fcfdaacb4..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/modified-artifact-1.0.0.pom +++ /dev/null @@ -1,22 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <modelVersion>4.0.0</modelVersion> - <artifactId>modified-artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/newversion-artifact-1.0.1.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/newversion-artifact-1.0.1.pom deleted file mode 100644 index f441c9a46..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/newversion-artifact-1.0.1.pom +++ /dev/null @@ -1,22 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>newversoin-artifact</artifactId> - <version>1.0.1</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/relocated-v3artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/relocated-v3artifact-1.0.0.pom deleted file mode 100644 index ab112a296..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/relocated-v3artifact-1.0.0.pom +++ /dev/null @@ -1,27 +0,0 @@ -<project> - <pomVersion>3</pomVersion> - <artifactId>relocated-v3artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <properties> - <scope>test</scope> - </properties> - </dependency> - </dependencies> - <repository> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </repository> - <properties> - <relocated.groupId>relocated-test</relocated.groupId> - </properties> -</project>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/rollback-created-artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/rollback-created-artifact-1.0.0.pom deleted file mode 100644 index 00692be72..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/rollback-created-artifact-1.0.0.pom +++ /dev/null @@ -1,39 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <pomVersion>3</pomVersion> - <artifactId>v3artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <properties> - <scope>test</scope> - </properties> - </dependency> - </dependencies> - <!-- deliberate parse error --> - <repository> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/unmodified-artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/unmodified-artifact-1.0.0.pom deleted file mode 100644 index a8428a8a4..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/unmodified-artifact-1.0.0.pom +++ /dev/null @@ -1,25 +0,0 @@ -<!-- - ~ 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> - <modelVersion>4.0.0</modelVersion> - <artifactId>unmodified-artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3-warnings-artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3-warnings-artifact-1.0.0.pom deleted file mode 100644 index 5f347f371..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3-warnings-artifact-1.0.0.pom +++ /dev/null @@ -1,48 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <pomVersion>3</pomVersion> - <extend>../project.xml</extend> - <artifactId>v3-warnings-artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> - <versions> - <version> - <id>1.0</id> - <name>1.0</name> - <tag>1_0</tag> - </version> - </versions> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <properties> - <scope>test</scope> - </properties> - </dependency> - </dependencies> - <repository> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </repository> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0-20060105.130101-3.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0-20060105.130101-3.pom deleted file mode 100644 index d7ae8953b..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0-20060105.130101-3.pom +++ /dev/null @@ -1,40 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <pomVersion>3</pomVersion> - <artifactId>v3artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0-20060105.130101-3</currentVersion> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <properties> - <scope>test</scope> - </properties> - </dependency> - </dependencies> - <repository> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </repository> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0-SNAPSHOT.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0-SNAPSHOT.pom deleted file mode 100644 index 3958a3358..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0-SNAPSHOT.pom +++ /dev/null @@ -1,40 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <pomVersion>3</pomVersion> - <artifactId>v3artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0-SNAPSHOT</currentVersion> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <properties> - <scope>test</scope> - </properties> - </dependency> - </dependencies> - <repository> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </repository> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0.pom deleted file mode 100644 index 5aed3437a..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v3artifact-1.0.0.pom +++ /dev/null @@ -1,24 +0,0 @@ -<project> - <pomVersion>3</pomVersion> - <artifactId>v3artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> - <dependencies> - <dependency> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>version</version> - </dependency> - <dependency> - <groupId>groupId</groupId> - <artifactId>test-artifactId</artifactId> - <version>version</version> - <properties> - <scope>test</scope> - </properties> - </dependency> - </dependencies> - <repository> - <connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection> - </repository> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0-20060111.120115-1.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0-20060111.120115-1.pom deleted file mode 100644 index e4f36566a..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0-20060111.120115-1.pom +++ /dev/null @@ -1,22 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>v4artifact</artifactId> - <version>1.0.0-20060111.120115-1</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0-SNAPSHOT.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0-SNAPSHOT.pom deleted file mode 100644 index be5b8b7e2..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0-SNAPSHOT.pom +++ /dev/null @@ -1,22 +0,0 @@ -<!-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed 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> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>v4artifact</artifactId> - <version>1.0.0-SNAPSHOT</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0.pom deleted file mode 100644 index fa6e82b1e..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/source-repository/test/poms/v4artifact-1.0.0.pom +++ /dev/null @@ -1,6 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>test</groupId> - <artifactId>v4artifact</artifactId> - <version>1.0.0</version> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/modified-artifact/1.0.0/modified-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/modified-artifact/1.0.0/modified-artifact-1.0.0.jar deleted file mode 100644 index 27597bc21..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/modified-artifact/1.0.0/modified-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -unmodified diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/modified-artifact/1.0.0/modified-artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/modified-artifact/1.0.0/modified-artifact-1.0.0.pom deleted file mode 100644 index d23afd027..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/modified-artifact/1.0.0/modified-artifact-1.0.0.pom +++ /dev/null @@ -1,25 +0,0 @@ -<!-- - ~ 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> - <modelVersion>4.0.0</modelVersion> - <artifactId>modified-artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/1.0.0/newversion-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/1.0.0/newversion-artifact-1.0.0.jar deleted file mode 100644 index 27597bc21..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/1.0.0/newversion-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -unmodified diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/1.0.0/newversion-artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/1.0.0/newversion-artifact-1.0.0.pom deleted file mode 100644 index e21492ebf..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/1.0.0/newversion-artifact-1.0.0.pom +++ /dev/null @@ -1,25 +0,0 @@ -<!-- - ~ 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> - <modelVersion>4.0.0</modelVersion> - <artifactId>newversion-artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/maven-metadata.xml b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/maven-metadata.xml deleted file mode 100644 index 42537e4c5..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/newversion-artifact/maven-metadata.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - ~ 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. - --> - -<metadata> - <groupId>test</groupId> - <artifactId>newversion-artifact</artifactId> - <versioning> - <versions> - <version>1.0.0</version> - </versions> - </versioning> -</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/unmodified-artifact/1.0.0/unmodified-artifact-1.0.0.jar b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/unmodified-artifact/1.0.0/unmodified-artifact-1.0.0.jar deleted file mode 100644 index 27597bc21..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/unmodified-artifact/1.0.0/unmodified-artifact-1.0.0.jar +++ /dev/null @@ -1 +0,0 @@ -unmodified diff --git a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/unmodified-artifact/1.0.0/unmodified-artifact-1.0.0.pom b/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/unmodified-artifact/1.0.0/unmodified-artifact-1.0.0.pom deleted file mode 100644 index a8428a8a4..000000000 --- a/archiva-modules/archiva-maven/archiva-maven-converter/src/test/target-repository/test/unmodified-artifact/1.0.0/unmodified-artifact-1.0.0.pom +++ /dev/null @@ -1,25 +0,0 @@ -<!-- - ~ 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> - <modelVersion>4.0.0</modelVersion> - <artifactId>unmodified-artifact</artifactId> - <groupId>test</groupId> - <currentVersion>1.0.0</currentVersion> -</project> |