git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1401299 13f79535-47bb-0310-9956-ffa450edef68tags/archiva-1.4-M4
@@ -170,7 +170,7 @@ public class ArchivaMetadataCreationConsumer | |||
try | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( repoId ).namespace( artifact.getNamespace() ).projectId( | |||
new ReadMetadataRequest().repositoryId( repoId ).namespace( artifact.getNamespace() ).projectId( | |||
artifact.getProject() ).projectVersion( projectVersion ); | |||
versionMetadata = repositoryStorage.readProjectVersionMetadata( readMetadataRequest ); | |||
createVersionMetadata = true; |
@@ -100,7 +100,7 @@ public class DefaultMetadataResolver | |||
try | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( repoId ).namespace( namespace ).projectId( | |||
new ReadMetadataRequest().repositoryId( repoId ).namespace( namespace ).projectId( | |||
projectId ).projectVersion( projectVersion ); | |||
metadata = repositoryStorage.readProjectVersionMetadata( readMetadataRequest ); | |||
@@ -314,7 +314,7 @@ public class DefaultMetadataResolver | |||
try | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( repoId ).namespace( namespace ).projectId( | |||
new ReadMetadataRequest().repositoryId( repoId ).namespace( namespace ).projectId( | |||
projectId ).projectVersion( projectVersion ); | |||
ProjectVersionMetadata versionMetadata = | |||
repositoryStorage.readProjectVersionMetadata( readMetadataRequest ); | |||
@@ -373,7 +373,7 @@ public class DefaultMetadataResolver | |||
ExcludesFilter<String> filter = new ExcludesFilter<String>( createArtifactIdList( artifacts ) ); | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( repoId ).namespace( namespace ).projectId( projectId ).projectVersion( | |||
new ReadMetadataRequest().repositoryId( repoId ).namespace( namespace ).projectId( projectId ).projectVersion( | |||
projectVersion ).filter( filter ); | |||
Collection<ArtifactMetadata> storageArtifacts = |
@@ -66,7 +66,7 @@ public class ReadMetadataRequest | |||
this.repositoryId = repositoryId; | |||
} | |||
public ReadMetadataRequest repoId( String repoId ) | |||
public ReadMetadataRequest repositoryId( String repoId ) | |||
{ | |||
this.repositoryId = repoId; | |||
return this; |
@@ -26,7 +26,7 @@ import org.apache.archiva.metadata.repository.filter.Filter; | |||
import java.util.Collection; | |||
// FIXME: we should drop the repoId parameters and attach this to an instance of a repository storage | |||
// FIXME: we should drop the repositoryId parameters and attach this to an instance of a repository storage | |||
public interface RepositoryStorage | |||
{ | |||
ProjectMetadata readProjectMetadata( String repoId, String namespace, String projectId ); |
@@ -178,7 +178,7 @@ public class Maven2RepositoryMetadataResolverMRM1411RepoGroupTest | |||
"target/test-repository/com/example/test/test-artifact-module-a" ); | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"test-artifact-module-a" ).projectVersion( "1.0" ); | |||
ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( readMetadataRequest ); | |||
@@ -230,7 +230,7 @@ public class Maven2RepositoryMetadataResolverMRM1411RepoGroupTest | |||
"target/test-repository/com/example/test/test-artifact-module-a" ); | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"test-artifact-module-a" ).projectVersion( "1.0" ); | |||
ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( readMetadataRequest ); | |||
assertEquals( "1.0", metadata.getId() ); | |||
@@ -257,7 +257,7 @@ public class Maven2RepositoryMetadataResolverMRM1411RepoGroupTest | |||
"target/test-repository/com/example/test/test-artifact-module-a" ); | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"missing-parent" ).projectVersion( "1.1" ); | |||
ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( readMetadataRequest ); | |||
@@ -331,7 +331,7 @@ public class Maven2RepositoryMetadataResolverMRM1411RepoGroupTest | |||
"target/test-repositorys/com/example/test/test-snapshot-artifact-module-a" ); | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_SNAP_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_SNAP_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"test-snapshot-artifact-module-a" ).projectVersion( "1.1-SNAPSHOT" ); | |||
ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( readMetadataRequest ); | |||
@@ -374,7 +374,7 @@ public class Maven2RepositoryMetadataResolverMRM1411RepoGroupTest | |||
"target/test-repository/com/example/test/test-artifact-module-b" ); | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"test-artifact-module-b" ).projectVersion( "1.0" ); | |||
ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( readMetadataRequest ); |
@@ -97,7 +97,7 @@ public class Maven2RepositoryMetadataResolverManagedReleaseTest | |||
// skygo IMHO must fail because TEST_REPO_ID ( is snap ,no release) and we seek for a snapshot | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "org.apache.maven" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "org.apache.maven" ).projectId( | |||
"maven-archiver" ).projectVersion( "2.4.1" ); | |||
ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( readMetadataRequest ); | |||
@@ -109,7 +109,7 @@ public class Maven2RepositoryMetadataResolverManagedReleaseTest | |||
throws Exception | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"missing-metadata" ).projectVersion( "1.0-SNAPSHOT" ); | |||
storage.readProjectVersionMetadata( readMetadataRequest ); | |||
} | |||
@@ -120,7 +120,7 @@ public class Maven2RepositoryMetadataResolverManagedReleaseTest | |||
throws Exception | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectVersion( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectVersion( | |||
"malformed-metadata" ).projectVersion( "1.0-SNAPSHOT" ); | |||
storage.readProjectVersionMetadata( readMetadataRequest ); | |||
} |
@@ -94,7 +94,7 @@ public class Maven2RepositoryMetadataResolverManagedSnapshotTest | |||
// skygo IMHO must fail because TEST_REPO_ID ( is snap ,no release) and we seek for a snapshot | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "org.apache.maven" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "org.apache.maven" ).projectId( | |||
"maven-archiver" ).projectVersion( "2.4.1" ); | |||
ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( readMetadataRequest ); | |||
@@ -106,7 +106,7 @@ public class Maven2RepositoryMetadataResolverManagedSnapshotTest | |||
throws Exception | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"mislocated-pom" ).projectVersion( "1.0" ); | |||
storage.readProjectVersionMetadata( readMetadataRequest ); | |||
@@ -126,7 +126,7 @@ public class Maven2RepositoryMetadataResolverManagedSnapshotTest | |||
throws Exception | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"invalid-pom" ).projectVersion( "1.0" ); | |||
storage.readProjectVersionMetadata( readMetadataRequest ); | |||
} | |||
@@ -137,7 +137,7 @@ public class Maven2RepositoryMetadataResolverManagedSnapshotTest | |||
throws Exception | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "com.example.test" ).projectId( | |||
"missing-pom" ).projectVersion( "1.0" ); | |||
storage.readProjectVersionMetadata( readMetadataRequest ); | |||
} |
@@ -147,7 +147,7 @@ public class Maven2RepositoryMetadataResolverTest | |||
throws Exception | |||
{ | |||
ReadMetadataRequest readMetadataRequest = | |||
new ReadMetadataRequest().repoId( TEST_REPO_ID ).namespace( "org.apache.maven" ).projectId( | |||
new ReadMetadataRequest().repositoryId( TEST_REPO_ID ).namespace( "org.apache.maven" ).projectId( | |||
"maven-archiver" ).projectVersion( "2.4.1" ); | |||
ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( readMetadataRequest ); | |||
MavenProjectFacet facet = (MavenProjectFacet) metadata.getFacet( MavenProjectFacet.FACET_ID ); |