[MRM-980] ability to merge repositories

submitted by Patti Arachchige Eshan Sudharaka

o added artifacts to test-repository to be used for repo merge


git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-MRM-980@960320 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2010-07-04 11:16:31 +00:00
parent 4868ae2e1a
commit dc625beeb1
10 changed files with 1241 additions and 9 deletions

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<version>1.2.1</version>
</metadata>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<version>1.2.2</version>
</metadata>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<versioning>
<latest>1.2.2</latest>
<release>1.2.2</release>
<versions>
<version>1.2.1</version>
<version>1.2.2</version>
</versions>
</versioning>
</metadata>

View File

@ -433,7 +433,7 @@ public class Maven2RepositoryMetadataResolverTest
assertEquals( Arrays.asList( "4", "5-SNAPSHOT" ), resolver.getProjectVersions( TEST_REPO_ID, "org.apache",
"apache" ) );
assertEquals( Arrays.asList( "1.2.1" ), resolver.getProjectVersions( TEST_REPO_ID, "org.apache.archiva",
assertEquals( Arrays.asList( "1.2.1", "1.2.2" ), resolver.getProjectVersions( TEST_REPO_ID, "org.apache.archiva",
"archiva" ) );
assertEquals( Arrays.asList( "1.2.1" ), resolver.getProjectVersions( TEST_REPO_ID, "org.apache.archiva",
"archiva-base" ) );

View File

@ -120,13 +120,13 @@ public class ArtifactsMergerTest
verify( repositoryFactory ).getManagedRepositoryContent( SOURCE_REPOSITORY_ID );
verify( repositoryFactory ).getManagedRepositoryContent( TARGET_REPOSITORY_ID );
verify( sourceArtifacts ).getSourceArtifactList();
verify( metadataResolver ).getArtifacts( TARGET_REPOSITORY_ID, "org.apache.archiva", "archiva", "1.2.1" );
verify( metadataResolver ).getArtifacts( TARGET_REPOSITORY_ID, "org.apache.archiva", "archiva", "1.2.2" );
}
public Collection<ArchivaArtifact> getArtifacts()
{
ArchivaArtifact a1 =
new ArchivaArtifact( "org.apache.archiva", "archiva", "1.2.1", "", "jar", SOURCE_REPOSITORY_ID );
new ArchivaArtifact( "org.apache.archiva", "archiva", "1.2.2", "", "jar", SOURCE_REPOSITORY_ID );
ArchivaArtifact a2 =
new ArchivaArtifact( "org.apache.archiva", "archiva", "1.5", "", "jar", SOURCE_REPOSITORY_ID );
ArrayList<ArchivaArtifact> list = new ArrayList<ArchivaArtifact>();
@ -140,7 +140,7 @@ public class ArtifactsMergerTest
ArtifactMetadata m1 = new ArtifactMetadata();
m1.setNamespace( "org.apache.archiva" );
m1.setProject( "archiva" );
m1.setVersion( "1.2.1" );
m1.setVersion( "1.2.2" );
ArrayList<ArtifactMetadata> list = new ArrayList<ArtifactMetadata>();
list.add( m1 );
return list;
@ -148,7 +148,7 @@ public class ArtifactsMergerTest
public void setRepositoryConfigurations()
{
File sourceRepoFile = new File( getBasedir(), "src/test/resources/test-repository" );
File sourceRepoFile = new File( getBasedir(), "target/test-repository" );
File targetRepoFile = new File( getBasedir(), "src/test/resources/target-repo" );
// sourceRepoFile.mkdirs();
// targetRepoFile.mkdirs();

View File

@ -5,6 +5,6 @@
<artifactId>archiva</artifactId>
<version>1.2.1</version>
<versioning>
<lastUpdated>20100702064543</lastUpdated>
<lastUpdated>20100702152308</lastUpdated>
</versioning>
</metadata>

View File

@ -4,11 +4,12 @@
<groupId>org.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<versioning>
<latest>1.2.1</latest>
<release>1.2.1</release>
<latest>1.2.2</latest>
<release>1.2.2</release>
<versions>
<version>1.2.1</version>
<version>1.2.2</version>
</versions>
<lastUpdated>20100702064543</lastUpdated>
<lastUpdated>20100704111236</lastUpdated>
</versioning>
</metadata>