continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r389182 - /maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
Date Mon, 27 Mar 2006 16:08:33 GMT
Author: brett
Date: Mon Mar 27 08:08:31 2006
New Revision: 389182

URL: http://svn.apache.org/viewcvs?rev=389182&view=rev
Log:
fix tests when projects are built in Continuum

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java

Modified: maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java?rev=389182&r1=389181&r2=389182&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
Mon Mar 27 08:08:31 2006
@@ -33,12 +33,14 @@
 import org.codehaus.plexus.jdo.ConfigurableJdoFactory;
 import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
 import org.codehaus.plexus.jdo.JdoFactory;
+import org.codehaus.plexus.util.IOUtil;
 import org.jpox.SchemaTool;
 
 import javax.jdo.JDODetachedFieldAccessException;
 import javax.jdo.PersistenceManager;
 import javax.jdo.PersistenceManagerFactory;
 import java.io.File;
+import java.io.FileOutputStream;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -1783,7 +1785,9 @@
             System.setProperty( (String) entry.getKey(), (String) entry.getValue() );
         }
 
-        File file = getTestFile( "../continuum-model/target/classes/META-INF/package.jdo"
);
+        File file = File.createTempFile( "continuum-jdo", ".tmp" );
+        file.deleteOnExit();
+        IOUtil.copy( getClass().getResourceAsStream( "/META-INF/package.jdo" ), new FileOutputStream(
file ) );
 
         SchemaTool.createSchemaTables( new URL[]{file.toURL()}, false );
 



Mime
View raw message