archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1174538 - in /archiva/trunk/archiva-modules/archiva-web/archiva-rest: archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ archiva-rest-services/src/test/java/org/apache/archiva/rest/services/
Date Fri, 23 Sep 2011 06:41:04 GMT
Author: olamy
Date: Fri Sep 23 06:41:04 2011
New Revision: 1174538

URL: http://svn.apache.org/viewvc?rev=1174538&view=rev
Log:
use a field from parent class

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ArtifactTransferRequest.java
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ArtifactTransferRequest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ArtifactTransferRequest.java?rev=1174538&r1=1174537&r2=1174538&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ArtifactTransferRequest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ArtifactTransferRequest.java
Fri Sep 23 06:41:04 2011
@@ -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;

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java?rev=1174538&r1=1174537&r2=1174538&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java
Fri Sep 23 06:41:04 2011
@@ -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();
     }
 



Mime
View raw message