mirror of https://github.com/apache/archiva.git
use a field from parent class
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1174538 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
078860949f
commit
bfbdfc036e
|
@ -29,20 +29,8 @@ public class ArtifactTransferRequest
|
|||
extends Artifact
|
||||
implements Serializable
|
||||
{
|
||||
private String sourceRepositoryId;
|
||||
|
||||
private String targetRepositoryId;
|
||||
|
||||
public String getSourceRepositoryId()
|
||||
{
|
||||
return sourceRepositoryId;
|
||||
}
|
||||
|
||||
public void setSourceRepositoryId( String sourceRepositoryId )
|
||||
{
|
||||
this.sourceRepositoryId = sourceRepositoryId;
|
||||
}
|
||||
|
||||
public String getTargetRepositoryId()
|
||||
{
|
||||
return targetRepositoryId;
|
||||
|
|
|
@ -39,10 +39,6 @@ public class CopyArtifactTest
|
|||
|
||||
static final String SOURCE_REPO_ID = "test-origin-repo";
|
||||
|
||||
@Inject
|
||||
private RepositoryContentFactory repositoryFactory;
|
||||
|
||||
|
||||
private void initSourceTargetRepo()
|
||||
throws Exception
|
||||
{
|
||||
|
@ -119,19 +115,12 @@ public class CopyArtifactTest
|
|||
artifactTransferRequest.setGroupId( "org.apache.karaf.features" );
|
||||
artifactTransferRequest.setArtifactId( "org.apache.karaf.features.core" );
|
||||
artifactTransferRequest.setVersion( "2.2.2" );
|
||||
artifactTransferRequest.setSourceRepositoryId( SOURCE_REPO_ID );
|
||||
artifactTransferRequest.setRepositoryId( SOURCE_REPO_ID );
|
||||
artifactTransferRequest.setTargetRepositoryId( TARGET_REPO_ID );
|
||||
Boolean res = getRepositoriesService( authorizationHeader ).copyArtifact( artifactTransferRequest );
|
||||
// END SNIPPET: copy-artifact
|
||||
assertTrue( res );
|
||||
|
||||
ArtifactReference artifactReference = new ArtifactReference();
|
||||
artifactReference.setArtifactId( artifactTransferRequest.getArtifactId() );
|
||||
artifactReference.setGroupId( artifactTransferRequest.getGroupId() );
|
||||
artifactReference.setVersion( artifactTransferRequest.getVersion() );
|
||||
artifactReference.setClassifier( artifactTransferRequest.getClassifier() );
|
||||
String packaging = StringUtils.trim( artifactTransferRequest.getPackaging() );
|
||||
artifactReference.setType( StringUtils.isEmpty( packaging ) ? "jar" : packaging );
|
||||
|
||||
String targetRepoPath =
|
||||
getManagedRepositoriesService( authorizationHeader ).getManagedRepository( TARGET_REPO_ID ).getLocation();
|
||||
|
@ -143,6 +132,7 @@ public class CopyArtifactTest
|
|||
"/org/apache/karaf/features/org.apache.karaf.features.core/2.2.2/org.apache.karaf.features.core-2.2.2.pom" );
|
||||
|
||||
assertTrue( "not exists " + pom.getPath(), pom.exists() );
|
||||
// TODO find a way to force metadata generation and test it !!
|
||||
clean();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue