add snippet for documentation

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1174424 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-09-22 22:21:08 +00:00
parent 45eaefbd9a
commit 6e960088a2
1 changed files with 4 additions and 1 deletions

View File

@ -87,13 +87,16 @@ public class CopyArtifactTest
{
initSourceTargetRepo();
// START SNIPPET: copy-artifact
ArtifactTransferRequest artifactTransferRequest = new ArtifactTransferRequest();
artifactTransferRequest.setGroupId( "org.apache.karaf.features" );
artifactTransferRequest.setArtifactId( "org.apache.karaf.features.core" );
artifactTransferRequest.setVersion( "2.2.2" );
artifactTransferRequest.setSourceRepositoryId( SOURCE_REPO_ID );
artifactTransferRequest.setTargetRepositoryId( TARGET_REPO_ID );
assertTrue( getRepositoriesService( authorizationHeader ).copyArtifact( artifactTransferRequest ) );
Boolean res = getRepositoriesService( authorizationHeader ).copyArtifact( artifactTransferRequest );
// END SNIPPET: copy-artifact
assertTrue( res );
ArtifactReference artifactReference = new ArtifactReference();
artifactReference.setArtifactId( artifactTransferRequest.getArtifactId() );