You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/02/21 06:09:03 UTC

svn commit: r379344 - in /maven/components/branches/maven-2.0.x/maven-core-it/it0088: pom.xml src/test/java/org/apache/maven/it0088/PomInterpolationTest.java

Author: brett
Date: Mon Feb 20 21:09:01 2006
New Revision: 379344

URL: http://svn.apache.org/viewcvs?rev=379344&view=rev
Log:
workaround failure on windows. We're filtering paths into a properties file, and they use \ as an escape

Modified:
    maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml
    maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java

Modified: maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml?rev=379344&r1=379343&r2=379344&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml Mon Feb 20 21:09:01 2006
@@ -11,6 +11,12 @@
       <type>jar</type>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.1</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <resources>

Modified: maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java
URL: http://svn.apache.org/viewcvs/maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java?rev=379344&r1=379343&r2=379344&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java (original)
+++ maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java Mon Feb 20 21:09:01 2006
@@ -6,6 +6,10 @@
 import java.io.File;
 import java.io.FileInputStream;
 
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.StringInputStream;
+import org.codehaus.plexus.util.StringUtils;
+
 public class PomInterpolationTest
     extends TestCase
 {
@@ -26,7 +30,12 @@
 
         assertTrue( testPropertiesFile.exists() );
 
-        testProperties.load( new FileInputStream( testPropertiesFile ) );
+        String content = FileUtils.fileRead( testPropertiesFile );
+
+        // Properties files need \\ escaped
+        content = StringUtils.replace( content, "\\", "\\\\" );
+
+        testProperties.load( new StringInputStream( content ) );
 
         File projectBuildDirectory = new File( basedir, "target" );