continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1370756 - /continuum/trunk/continuum-core/src/test/java/org/apache/continuum/AbstractAddProjectTest.java
Date Wed, 08 Aug 2012 13:23:48 GMT
Author: brett
Date: Wed Aug  8 13:23:47 2012
New Revision: 1370756

URL: http://svn.apache.org/viewvc?rev=1370756&view=rev
Log:
make local repository selection more robust for tests

Modified:
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/AbstractAddProjectTest.java

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/continuum/AbstractAddProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/continuum/AbstractAddProjectTest.java?rev=1370756&r1=1370755&r2=1370756&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/continuum/AbstractAddProjectTest.java
(original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/continuum/AbstractAddProjectTest.java
Wed Aug  8 13:23:47 2012
@@ -18,7 +18,10 @@
  */
 package org.apache.continuum;
 
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.continuum.AbstractContinuumTest;
+import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper;
+import org.apache.maven.continuum.execution.maven.m2.SettingsConfigurationException;
 import org.codehaus.plexus.util.FileUtils;
 
 import java.io.File;
@@ -37,9 +40,12 @@ public abstract class AbstractAddProject
     }
 
     protected void createLocalRepository()
-        throws IOException
+        throws IOException, SettingsConfigurationException
     {
-        File localRepo = getTestFile( "target/test-classes/.m2/repository" );
+        MavenBuilderHelper helper = (MavenBuilderHelper) lookup( MavenBuilderHelper.class
);
+        ArtifactRepository repo = helper.getLocalRepository();
+
+        File localRepo = new File( repo.getBasedir() );
         mkdirs( localRepo );
 
         File artifact =



Mime
View raw message