You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2014/08/08 22:38:14 UTC
svn commit: r1616871 -
/maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java
Author: rfscholte
Date: Fri Aug 8 20:38:14 2014
New Revision: 1616871
URL: http://svn.apache.org/r1616871
Log:
Fix unittest; newer version of Wagon expect an id for the repository. Stub always returns null, so a little workaround required.
Modified:
maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java
Modified: maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java?rev=1616871&r1=1616870&r2=1616871&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java Fri Aug 8 20:38:14 2014
@@ -25,6 +25,7 @@ import java.util.Collection;
import java.util.List;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.model.Dependency;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.dependency.AbstractDependencyMojoTestCase;
@@ -716,7 +717,15 @@ public class TestCopyMojo
List<ArtifactItem> list = stubFactory.getArtifactItems( stubFactory.getClassifiedArtifacts() );
mojo.setArtifactItems( list );
- mojo.setLocal( new StubArtifactRepository( this.testDir.getAbsolutePath() ) );
+ ArtifactRepository local = new StubArtifactRepository( this.testDir.getAbsolutePath() )
+ {
+ @Override
+ public String getId()
+ {
+ return "ID";
+ }
+ };
+ mojo.setLocal( local );
File execLocalRepo = new File( this.testDir.getAbsolutePath(), "executionLocalRepo" );
assertFalse( execLocalRepo.exists() );