continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r389450 - /maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
Date Tue, 28 Mar 2006 09:26:12 GMT
Author: evenisse
Date: Tue Mar 28 01:25:28 2006
New Revision: 389450

URL: http://svn.apache.org/viewcvs?rev=389450&view=rev
Log:
Remove all dependencies to file system in other projects

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java?rev=389450&r1=389449&r2=389450&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
Tue Mar 28 01:25:28 2006
@@ -34,28 +34,23 @@
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.InterpolationFilterReader;
+import org.codehaus.plexus.util.StringInputStream;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 
-import java.io.ByteArrayInputStream;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintWriter;
-import java.io.Reader;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Collection;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Properties;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -95,7 +90,11 @@
     protected InputStream getConfiguration()
         throws Exception
     {
-        return getClass().getResourceAsStream( "/conf/application.xml" );
+        String conf = IOUtil.toString( getClass().getResourceAsStream( "/conf/application.xml"
) );
+
+        conf = StringUtils.replace( conf, "../../../../../continuum-web/src/main/resources",
"webapp" );
+
+        return new StringInputStream( conf );
     }
 
     protected void customizeContext( Context context )
@@ -119,6 +118,28 @@
         }
 
         context.put( "plexus.home", plexusHome.getAbsolutePath() );
+
+        // Create webapp directory and subdirectories so conf generated by getConfiguration()
will be ok
+        File webappDirectory = new File( plexusHome, "webapp" );
+
+        if ( webappDirectory.exists() )
+        {
+            FileUtils.deleteDirectory( webappDirectory );
+        }
+
+        assertTrue( webappDirectory.mkdirs() );
+
+        File formsDirectory = new File( webappDirectory, "forms" );
+
+        assertTrue( formsDirectory.mkdirs() );
+
+        File templatesDirectory = new File( webappDirectory, "templates" );
+
+        assertTrue( templatesDirectory.mkdirs() );
+
+        File localizationDirectory = new File( webappDirectory, "localization" );
+
+        assertTrue( localizationDirectory.mkdirs() );
     }
 
     public final void setUp()



Mime
View raw message