Now tests also succeed under Eclipse
authorRobert Scholte <rfscholte@apache.org>
Sun, 16 Dec 2012 12:12:31 +0000 (12:12 +0000)
committerRobert Scholte <rfscholte@apache.org>
Sun, 16 Dec 2012 12:12:31 +0000 (12:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1422564 13f79535-47bb-0310-9956-ffa450edef68

src/test/java/org/apache/maven/plugin/deploy/stubs/ArtifactRepositoryStub.java
src/test/resources/unit/basic-deploy-pom/plugin-config.xml
src/test/resources/unit/basic-deploy-test/plugin-config.xml
src/test/resources/unit/basic-deploy-with-attached-artifacts/plugin-config.xml

index ad756c9..099ba2b 100644 (file)
@@ -35,6 +35,8 @@ public class ArtifactRepositoryStub
     
     private String url;
     
+    private String basedir = System.getProperty( "basedir" );
+
     public String pathOf( Artifact artifact )
     {
         return getLayout().pathOf( artifact );
@@ -57,12 +59,12 @@ public class ArtifactRepositoryStub
     
     public void setAppendToUrl( String dir )
     {
-        this.url = "file://" + System.getProperty( "basedir" ) + "/target/remote-repo/" + dir;
+        this.url = "file://" + basedir + "/target/remote-repo/" + dir;
     }
     
     public String getBasedir()
     {
-        return System.getProperty( "basedir" );
+        return basedir;
     }
     
     public String getProtocol()
index 44ca6fc..798927f 100644 (file)
@@ -35,7 +35,9 @@ under the License.
             <packaging>pom</packaging>
             <artifact implementation="org.apache.maven.plugin.deploy.stubs.DeployArtifactStub" />
             <attachedArtifacts />
-            <deploymentRepository implementation="org.apache.maven.plugin.deploy.stubs.ArtifactRepositoryStub" />
+            <deploymentRepository implementation="org.apache.maven.plugin.deploy.stubs.ArtifactRepositoryStub">
+              <basedir>${basedir}</basedir>
+            </deploymentRepository>
           </project>
           <updateReleaseInfo>true</updateReleaseInfo>
         </configuration>
index 9756705..45f82a3 100644 (file)
Binary files a/src/test/resources/unit/basic-deploy-test/plugin-config.xml and b/src/test/resources/unit/basic-deploy-test/plugin-config.xml differ
index ac48ed2..3d54491 100644 (file)
@@ -39,7 +39,9 @@ under the License.
             <attachedArtifacts>
               <attachedArtifact implementation="org.apache.maven.plugin.deploy.stubs.AttachedArtifactStub" />
             </attachedArtifacts>
-            <deploymentRepository implementation="org.apache.maven.plugin.deploy.stubs.ArtifactRepositoryStub" />
+            <deploymentRepository implementation="org.apache.maven.plugin.deploy.stubs.ArtifactRepositoryStub">
+              <basedir>${basedir}</basedir>
+            </deploymentRepository>
           </project>
           <updateReleaseInfo>true</updateReleaseInfo>
         </configuration>