maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1098314 [2/3] - in /maven/plugins/trunk: maven-ant-plugin/src/it/webapp-it/ maven-antrun-plugin/src/it/attach-artifact-test/ maven-antrun-plugin/src/it/filesets-test/ maven-antrun-plugin/src/it/multiple-phase-test/ maven-changes-plugin/src...
Date Sun, 01 May 2011 14:19:11 GMT
Modified: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-77/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-77/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-77/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-77/verify.bsh Sun May  1 14:19:08 2011
@@ -32,89 +32,88 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File someResource = new File( target, "/SomeResource.txt" );
     if ( !someResource.exists() || someResource.isDirectory() )
     {
         System.err.println( "SomeResource.txt is missing or not a file." );
         return false;
-    }    
-    
-    FileInputStream fis = new FileInputStream ( someResource );
-    String paramContent = IOUtil.toString ( fis );
-    
+    }
+
+    String paramContent = FileUtils.fileRead( someResource );
+
     //test:direct resolution project.version=1.0-SNAPSHOT
     int indexOf = paramContent.indexOf( "test:direct resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:direct resolution project.version=1.0-SNAPSHOT" );
       return false;
-    }    
-    
+    }
+
 
     //test:filter resolution project.version=1.0-SNAPSHOT
     indexOf = paramContent.indexOf( "test:filter resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution project.version=1.0-SNAPSHOT" );
       return false;
-    } 
-    
+    }
+
     //test:filter direct projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct projectProperty=foo-projectProperty-bar" );
       return false;
-    }    
-    
+    }
+
     //test:filter resolution projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution projectProperty=foo-projectProperty-bar" );
       return false;
-    }         
-    
-    //test:filter direct profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter direct profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct profileProperty=foo-profileProperty-bar" );
       return false;
-    }     
-    
-    //test:filter resolution profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter resolution profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution profileProperty=foo-profileProperty-bar" );
       return false;
     }
-    
+
     //test:filter syspropsExecutionPropsWins=fromExecProps
     indexOf = paramContent.indexOf( "test:filter syspropsExecutionPropsWins=fromExecProps" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter syspropsExecutionPropsWins=fromExecProps" );
       return false;
-    }   
-    
-    //newToken=foo     
+    }
+
+    //newToken=foo
     indexOf = paramContent.indexOf( "newToken=foo" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains newToken=foo" );
       return false;
     }
-    
-    //var3=Bar-Bar/Stuff     
+
+    //var3=Bar-Bar/Stuff
     indexOf = paramContent.indexOf( "var3=Foo-Bar/Stuff" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains var3=Foo-Bar/Stuff" );
       return false;
-    }             
+    }
 
     //custom=my-custom-filter-value
     indexOf = paramContent.indexOf( "custom=my-custom-filter-value" );

Modified: maven/plugins/trunk/maven-resources-plugin/src/it/binaries-filtering/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/binaries-filtering/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/binaries-filtering/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/binaries-filtering/verify.bsh Sun May  1 14:19:08 2011
@@ -35,7 +35,7 @@ filesAreIdentical( File expected, File c
     try
     {
         byte[] expectedBuffer = IOUtil.toByteArray( expectedIn );
-        
+
         byte[] currentBuffer = IOUtil.toByteArray( currentIn );
         if (expectedBuffer.length != currentBuffer.length)
         {
@@ -71,19 +71,19 @@ try
       System.err.println( "filtered images happy_duke.gif are not identical." );
       return false;
   }
-  
+
   originalImg = new File( basedir, "src/main/resources/duke-beerjpg.img" );
-  
+
   targetImg = new File( basedir, "target/classes/duke-beerjpg.img" );
-  
+
   identical = filesAreIdentical( originalImg, targetImg );
 
   if (!identical)
   {
       System.err.println( "filtered .img duke-beer.jpg.img are not identical." );
       return false;
-  }  
-    
+  }
+
 }
 catch( Throwable e )
 {

Modified: maven/plugins/trunk/maven-resources-plugin/src/it/copy-resources-it/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/copy-resources-it/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/copy-resources-it/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/copy-resources-it/verify.bsh Sun May  1 14:19:08 2011
@@ -32,32 +32,29 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File resource = new File( target, "/extra-resources/configuration.properties" );
     if ( !resource.exists() || resource.isDirectory() )
     {
         System.err.println( "configuration.properties is missing or not a file." );
         return false;
-    }    
-    
-    FileInputStream fis = new FileInputStream ( resource );
-    String paramContent = IOUtil.toString ( fis );
+    }
+
+    String paramContent = FileUtils.fileRead( resource );
 
     int indexOf = paramContent.indexOf( "artifactId=maven-resources-plugin-copy-resources-it" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "configuration.properties not contains artifactId=maven-resources-plugin-copy-resources-it" );
       return false;
-    }    
-    
+    }
+
     int indexOf = paramContent.indexOf( "version=1.0.1-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "configuration.properties not contains version=1.0.1-SNAPSHOT" );
       return false;
-    }        
-
-            
+    }
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-resources-plugin/src/it/custom-delimiter/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/custom-delimiter/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/custom-delimiter/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/custom-delimiter/verify.bsh Sun May  1 14:19:08 2011
@@ -32,89 +32,88 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File someResource = new File( target, "/classes/SomeResource.txt" );
     if ( !someResource.exists() || someResource.isDirectory() )
     {
         System.err.println( "SomeResource.txt is missing or not a file." );
         return false;
-    }    
-    
-    FileInputStream fis = new FileInputStream ( someResource );
-    String paramContent = IOUtil.toString ( fis );
-    
+    }
+
+    String paramContent = FileUtils.fileRead( someResource );
+
     //test:direct resolution project.version=1.0-SNAPSHOT
     int indexOf = paramContent.indexOf( "test:direct resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:direct resolution project.version=1.0-SNAPSHOT" );
       return false;
-    }    
-    
+    }
+
 
     //test:filter resolution project.version=1.0-SNAPSHOT
     indexOf = paramContent.indexOf( "test:filter resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution project.version=1.0-SNAPSHOT" );
       return false;
-    } 
-    
+    }
+
     //test:filter direct projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct projectProperty=foo-projectProperty-bar" );
       return false;
-    }    
-    
+    }
+
     //test:filter resolution projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution projectProperty=foo-projectProperty-bar" );
       return false;
-    }         
-    
-    //test:filter direct profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter direct profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct profileProperty=foo-profileProperty-bar" );
       return false;
-    }     
-    
-    //test:filter resolution profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter resolution profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution profileProperty=foo-profileProperty-bar" );
       return false;
     }
-    
+
     //test:filter syspropsExecutionPropsWins=fromExecProps
     indexOf = paramContent.indexOf( "test:filter syspropsExecutionPropsWins=fromExecProps" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter syspropsExecutionPropsWins=fromExecProps" );
       return false;
-    }   
-    
-    //newToken=foo     
+    }
+
+    //newToken=foo
     indexOf = paramContent.indexOf( "newToken=foo" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains newToken=foo" );
       return false;
     }
-    
-    //var3=Foo-Bar/Thing     
+
+    //var3=Foo-Bar/Thing
     indexOf = paramContent.indexOf( "var3=Foo-Bar/Thing" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains var3=Foo-Bar/Thing" );
       return false;
-    }             
+    }
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-resources-plugin/src/it/escapeInterpolation/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/escapeInterpolation/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/escapeInterpolation/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/escapeInterpolation/verify.bsh Sun May  1 14:19:08 2011
@@ -32,163 +32,161 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File someResource = new File( target, "/classes/SomeResource.txt" );
     if ( !someResource.exists() || someResource.isDirectory() )
     {
         System.err.println( "SomeResource.txt is missing or not a file." );
         return false;
-    }    
-    
-    FileInputStream fis = new FileInputStream ( someResource );
-    String paramContent = IOUtil.toString ( fis );
-    
+    }
+
+    String paramContent = FileUtils.fileRead( someResource );
+
     //test:direct resolution project.version=1.0-SNAPSHOT
     int indexOf = paramContent.indexOf( "test:direct resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains test:direct resolution project.version=1.0-SNAPSHOT" );
       return false;
-    }    
-    
+    }
+
 
     //test:filter resolution project.version=1.0-SNAPSHOT
     indexOf = paramContent.indexOf( "test:filter resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains test:filter resolution project.version=1.0-SNAPSHOT" );
       return false;
-    } 
-    
+    }
+
     //test:filter direct projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains test:filter direct projectProperty=foo-projectProperty-bar" );
       return false;
-    }    
-    
+    }
+
     //test:filter resolution projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains test:filter resolution projectProperty=foo-projectProperty-bar" );
       return false;
-    }         
-    
-    //test:filter direct profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter direct profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains test:filter direct profileProperty=foo-profileProperty-bar" );
       return false;
-    }     
-    
-    //test:filter resolution profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter resolution profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains test:filter resolution profileProperty=foo-profileProperty-bar" );
       return false;
     }
-    
+
     //test:filter syspropsExecutionPropsWins=fromExecProps
     indexOf = paramContent.indexOf( "test:filter syspropsExecutionPropsWins=fromExecProps" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains test:filter syspropsExecutionPropsWins=fromExecProps" );
       return false;
-    }   
-    
-    //newToken=foo     
+    }
+
+    //newToken=foo
     indexOf = paramContent.indexOf( "newToken=foo" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains newToken=foo" );
       return false;
-    }      
+    }
 
     //escapeString=${project.version}
     indexOf = paramContent.indexOf( "escapeString=${project.artifactId}" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/classes/SomeResource.txt not contains escapeString=${project.version}" );
       System.out.println (" content " + paramContent );
       return false;
-    }     
+    }
 
     // -------------------------
-    // assert on test resources 
+    // assert on test resources
     // -------------------------
-    
-    
+
+
     someResource = new File( target, "/test-classes/SomeResource.txt" );
     if ( !someResource.exists() || someResource.isDirectory() )
     {
         System.err.println( "/test-classes/SomeResource.txt is missing or not a file." );
         return false;
-    }    
-    
-    fis = new FileInputStream ( someResource );
-    paramContent = IOUtil.toString ( fis );
-    
+    }
+
+    paramContent = FileUtils.fileRead( someResource );
+
     //test:direct resolution project.version=1.0-SNAPSHOT
     int indexOf = paramContent.indexOf( "test:direct resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/test-classes/SomeResource.txt not contains test:direct resolution project.version=1.0-SNAPSHOT" );
       return false;
-    }    
-    
+    }
+
 
     //test:filter resolution project.version=1.0-SNAPSHOT
     indexOf = paramContent.indexOf( "test:filter resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/test-classes/SomeResource.txt not contains test:filter resolution project.version=1.0-SNAPSHOT" );
       return false;
-    } 
-    
+    }
+
     //test:filter direct projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/test-classes/SomeResource.txt not contains test:filter direct projectProperty=foo-projectProperty-bar" );
       return false;
-    }    
-    
+    }
+
     //test:filter resolution projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/test-classes/SomeResource.txt not contains test:filter resolution projectProperty=foo-projectProperty-bar" );
       return false;
-    }         
-    
-    //test:filter direct profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter direct profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/test-classes/SomeResource.txt not contains test:filter direct profileProperty=foo-profileProperty-bar" );
       return false;
-    }     
-    
-    //test:filter resolution profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter resolution profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/test-classes/SomeResource.txt not contains test:filter resolution profileProperty=foo-profileProperty-bar" );
       return false;
-    }    
-    
+    }
+
     //escapeString=${project.version}
     indexOf = paramContent.indexOf( "escapeString=${project.version}" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "/test-classes/SomeResource.txt not contains escapeString=${project.version}" );
       return false;
-    }     
-     
+    }
+
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-resources-plugin/src/it/filter-test-resources/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/filter-test-resources/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/filter-test-resources/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/filter-test-resources/verify.bsh Sun May  1 14:19:08 2011
@@ -32,66 +32,65 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File someResource = new File( target, "/test-classes/SomeResource.txt" );
     if ( !someResource.exists() || someResource.isDirectory() )
     {
         System.err.println( "SomeResource.txt is missing or not a file." );
         return false;
-    }    
-    
-    FileInputStream fis = new FileInputStream ( someResource );
-    String paramContent = IOUtil.toString ( fis );
-    
+    }
+
+    String paramContent = FileUtils.fileRead( someResource );
+
     //test:direct resolution project.version=1.0-SNAPSHOT
     int indexOf = paramContent.indexOf( "test:direct resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:direct resolution project.version=1.0-SNAPSHOT" );
       return false;
-    }    
-    
+    }
+
 
     //test:filter resolution project.version=1.0-SNAPSHOT
     indexOf = paramContent.indexOf( "test:filter resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution project.version=1.0-SNAPSHOT" );
       return false;
-    } 
-    
+    }
+
     //test:filter direct projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct projectProperty=foo-projectProperty-bar" );
       return false;
-    }    
-    
+    }
+
     //test:filter resolution projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution projectProperty=foo-projectProperty-bar" );
       return false;
-    }         
-    
-    //test:filter direct profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter direct profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct profileProperty=foo-profileProperty-bar" );
       return false;
-    }     
-    
-    //test:filter resolution profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter resolution profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution profileProperty=foo-profileProperty-bar" );
       return false;
     }
-            
+
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-resources-plugin/src/it/filter/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/filter/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/filter/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/filter/verify.bsh Sun May  1 14:19:08 2011
@@ -32,89 +32,88 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File someResource = new File( target, "/classes/SomeResource.txt" );
     if ( !someResource.exists() || someResource.isDirectory() )
     {
         System.err.println( "SomeResource.txt is missing or not a file." );
         return false;
-    }    
-    
-    FileInputStream fis = new FileInputStream ( someResource );
-    String paramContent = IOUtil.toString ( fis );
-    
+    }
+
+    String paramContent = FileUtils.fileRead( someResource );
+
     //test:direct resolution project.version=1.0-SNAPSHOT
     int indexOf = paramContent.indexOf( "test:direct resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:direct resolution project.version=1.0-SNAPSHOT" );
       return false;
-    }    
-    
+    }
+
 
     //test:filter resolution project.version=1.0-SNAPSHOT
     indexOf = paramContent.indexOf( "test:filter resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution project.version=1.0-SNAPSHOT" );
       return false;
-    } 
-    
+    }
+
     //test:filter direct projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct projectProperty=foo-projectProperty-bar" );
       return false;
-    }    
-    
+    }
+
     //test:filter resolution projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution projectProperty=foo-projectProperty-bar" );
       return false;
-    }         
-    
-    //test:filter direct profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter direct profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct profileProperty=foo-profileProperty-bar" );
       return false;
-    }     
-    
-    //test:filter resolution profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter resolution profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution profileProperty=foo-profileProperty-bar" );
       return false;
     }
-    
+
     //test:filter syspropsExecutionPropsWins=fromExecProps
     indexOf = paramContent.indexOf( "test:filter syspropsExecutionPropsWins=fromExecProps" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter syspropsExecutionPropsWins=fromExecProps" );
       return false;
-    }   
-    
-    //newToken=foo     
+    }
+
+    //newToken=foo
     indexOf = paramContent.indexOf( "newToken=foo" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains newToken=foo" );
       return false;
     }
-    
-    //var3=Foo-Bar/Thing     
+
+    //var3=Foo-Bar/Thing
     indexOf = paramContent.indexOf( "var3=Foo-Bar/Thing" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains var3=Foo-Bar/Thing" );
       return false;
-    }             
+    }
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-resources-plugin/src/it/includeEmptyDirs/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/includeEmptyDirs/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/includeEmptyDirs/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/includeEmptyDirs/verify.bsh Sun May  1 14:19:08 2011
@@ -32,7 +32,7 @@ try
         System.err.println( "target file is missing or not a directory." );
         return false;
     }
-    
+
     File classes = new File( target, "classes" );
     if ( !classes.exists() || !classes.isDirectory() )
     {
@@ -46,11 +46,11 @@ try
         System.err.println( "target/classes/empty-dir file is missing or not a directory." );
         return false;
     }
-    
+
     if ( emptyDir.list().length != 0 )
     {
         System.err.println( "target/classes/empty-dir file has child." );
-        return false;    
+        return false;
     }
 
     File emptyDirChild = new File( classes, "empty-dir-child" );
@@ -63,96 +63,95 @@ try
     if ( emptyDirChild.list().length != 1 )
     {
         System.err.println( "target/classes/empty-dir-child file has child." );
-        return false;    
+        return false;
     }
-    
+
     File child = new File( emptyDirChild, "child" );
     if ( !child.exists() || !child.isDirectory() )
     {
         System.err.println( "target/classes/empty-dir-child/child file is missing or not a directory." );
         return false;
-    }    
-    
+    }
+
     if ( child.list().length != 0 )
     {
         System.err.println( "target/classes/empty-dir-child/child file has child." );
-        return false;    
-    }    
-    
+        return false;
+    }
+
     File someResource = new File( target, "/classes/SomeResource.txt" );
     if ( !someResource.exists() || someResource.isDirectory() )
     {
         System.err.println( "SomeResource.txt is missing or not a file." );
         return false;
-    }    
-    
-    FileInputStream fis = new FileInputStream ( someResource );
-    String paramContent = IOUtil.toString ( fis );
-    
+    }
+
+    String paramContent = FileUtils.fileRead( someResource );
+
     //test:direct resolution project.version=1.0-SNAPSHOT
     int indexOf = paramContent.indexOf( "test:direct resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:direct resolution project.version=1.0-SNAPSHOT" );
       return false;
-    }    
-    
+    }
+
 
     //test:filter resolution project.version=1.0-SNAPSHOT
     indexOf = paramContent.indexOf( "test:filter resolution project.version=1.0-SNAPSHOT" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution project.version=1.0-SNAPSHOT" );
       return false;
-    } 
-    
+    }
+
     //test:filter direct projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct projectProperty=foo-projectProperty-bar" );
       return false;
-    }    
-    
+    }
+
     //test:filter resolution projectProperty=foo-projectProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution projectProperty=foo-projectProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution projectProperty=foo-projectProperty-bar" );
       return false;
-    }         
-    
-    //test:filter direct profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter direct profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter direct profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter direct profileProperty=foo-profileProperty-bar" );
       return false;
-    }     
-    
-    //test:filter resolution profileProperty=foo-profileProperty-bar    
+    }
+
+    //test:filter resolution profileProperty=foo-profileProperty-bar
     indexOf = paramContent.indexOf( "test:filter resolution profileProperty=foo-profileProperty-bar" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter resolution profileProperty=foo-profileProperty-bar" );
       return false;
     }
-    
+
     //test:filter syspropsExecutionPropsWins=fromExecProps
     indexOf = paramContent.indexOf( "test:filter syspropsExecutionPropsWins=fromExecProps" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains test:filter syspropsExecutionPropsWins=fromExecProps" );
       return false;
-    }   
-    
-    //newToken=foo     
+    }
+
+    //newToken=foo
     indexOf = paramContent.indexOf( "newToken=foo" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "SomeResource.txt not contains newToken=foo" );
       return false;
-    }       
+    }
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-resources-plugin/src/it/profile-override/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/profile-override/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/profile-override/verify.bsh (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/profile-override/verify.bsh Sun May  1 14:19:08 2011
@@ -32,25 +32,24 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File someResource = new File( target, "/classes/config.properties" );
     if ( !someResource.exists() || someResource.isDirectory() )
     {
         System.err.println( "config.properties is missing or not a file." );
         return false;
-    }    
-    
-    FileInputStream fis = new FileInputStream ( someResource );
-    String paramContent = IOUtil.toString ( fis );
+    }
+
+    String paramContent = FileUtils.fileRead( someResource );
 
     int indexOf = paramContent.indexOf( "env=production" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "config.properties not contains env=production" );
       return false;
-    }    
+    }
+
 
-            
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-159/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-159/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-159/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-159/verify.bsh Sun May  1 14:19:08 2011
@@ -26,21 +26,21 @@ boolean result = true;
 
 try
 {
-    final File siteDirectory = new File ( basedir, "target/site" );
+    final File siteDirectory = new File( basedir, "target/site" );
     if ( !siteDirectory.exists() || !siteDirectory.isDirectory() )
     {
         System.err.println( "site is missing or not a directory." );
         result = false;
     }
 
-    File index = new File ( siteDirectory, "index.html" );
+    File index = new File( siteDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "no index file or is a directory." );
         result = false;
     }
 
-    String content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    String content = FileUtils.fileRead( index, "UTF-8" );
     int index1 = content.indexOf( "<a href=\"http://webhost.company.com/index.html\" class=\"externalLink\" title=\"Breadcrumb\">Breadcrumb</a>" );
     int index2 = content.indexOf( "<a href=\"http://webhost.company.com/\" class=\"externalLink\" title=\"Link\">Link</a>" );
     int index3 = content.indexOf( "<a href=\"http://webhost.company.com/\" class=\"externalLink\" title=\"Menu\">Menu</a>" );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-265/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-265/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-265/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-265/verify.bsh Sun May  1 14:19:08 2011
@@ -32,47 +32,46 @@ try
         return false;
     }
 
-    File siteDirectory = new File ( target, "site" );
+    File siteDirectory = new File( target, "site" );
     if ( !siteDirectory.exists() || !siteDirectory.isDirectory() )
     {
         System.err.println( "site file is missing or not a directory." );
         return false;
     }
 
-    File releaseDirectory = new File ( siteDirectory, "releases" );
+    File releaseDirectory = new File( siteDirectory, "releases" );
     if ( !releaseDirectory.exists() || !releaseDirectory.isDirectory() )
     {
         System.err.println( "releaseDirectory file is missing or not a directory." );
         return false;
     }
-    File release163 = new File ( releaseDirectory, "release1.6.3.html" );
+    File release163 = new File( releaseDirectory, "release1.6.3.html" );
     if ( !release163.exists() || release163.isDirectory() )
     {
         System.err.println( "release163 file is missing or a directory." );
         return false;
     }
-    File release16 = new File ( releaseDirectory, "release1.6.html" );
+    File release16 = new File( releaseDirectory, "release1.6.html" );
     if ( !release16.exists() || release16.isDirectory() )
     {
         System.err.println( "release16 file is missing or a directory." );
         return false;
     }
 
-    File download = new File ( siteDirectory, "download.html" );
+    File download = new File( siteDirectory, "download.html" );
     if ( !download.exists() || download.isDirectory() )
     {
         System.err.println( "download.html file is missing or a directory." );
         return false;
     }
-    FileInputStream fis = new FileInputStream ( download );
-    String downloadContent = IOUtil.toString ( fis, "UTF-8" );
+    String downloadContent = FileUtils.fileRead( download, "UTF-8" );
     int indexOf = downloadContent.indexOf( "Download Maven 2.0.7" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
         System.err.println( "download.html doesn't contain Download Maven 2.0.7" );
         return false;
     }
-    if ( downloadContent.indexOf( "charset=UTF-8" ) < 0)
+    if ( downloadContent.indexOf( "charset=UTF-8" ) < 0 )
     {
         System.err.println( "download.html doesn't contain 'charset=UTF-8' directive" );
         return false;
@@ -83,7 +82,7 @@ try
         return false;
     }
 
-    File reports = new File ( siteDirectory, "project-reports.html" );
+    File reports = new File( siteDirectory, "project-reports.html" );
     if ( !reports.exists() || reports.isDirectory() )
     {
         System.err.println( "project-reports.html file is missing or a directory." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-304/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-304/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-304/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-304/verify.bsh Sun May  1 14:19:08 2011
@@ -31,7 +31,7 @@ try
         return false;
     }
 
-    File stagingDirectory = new File ( target, "staging" );
+    File stagingDirectory = new File( target, "staging" );
     if ( !stagingDirectory.exists() || !stagingDirectory.isDirectory() )
     {
         System.err.println( "Staging directory '" + stagingDirectory + "' is missing or not a directory." );
@@ -40,28 +40,28 @@ try
 
     String tmpDir = System.getProperty( "java.io.tmpdir" );
 
-    File childDirectory = new File ( stagingDirectory, "MSITE-304-child" );
+    File childDirectory = new File( stagingDirectory, "MSITE-304-child" );
     if ( !childDirectory.exists() || !childDirectory.isDirectory() )
     {
         System.err.println( "Staging directory for child '" + childDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    File stageDeployDirectory = new File ( tmpDir + "/www.example.com/parent" );
+    File stageDeployDirectory = new File( tmpDir + "/www.example.com/parent" );
     if ( !stageDeployDirectory.exists() || !stageDeployDirectory.isDirectory() )
     {
         System.err.println( "Stage deploy directory '" + stageDeployDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    File validChildStageDeployDirectory = new File ( stageDeployDirectory, "staging/MSITE-304-child" );
+    File validChildStageDeployDirectory = new File( stageDeployDirectory, "staging/MSITE-304-child" );
     if ( !validChildStageDeployDirectory.exists() || !validChildStageDeployDirectory.isDirectory() )
     {
         System.err.println( "Valid stage deploy directory for child '" + validChildStageDeployDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    File invalidChildStageDeployDirectory = new File ( stageDeployDirectory, "MSITE-304-child/staging" );
+    File invalidChildStageDeployDirectory = new File( stageDeployDirectory, "MSITE-304-child/staging" );
     if ( invalidChildStageDeployDirectory.exists() && invalidChildStageDeployDirectory.isDirectory() )
     {
         System.err.println( "Invalid stage deploy directory for child '" + invalidChildStageDeployDirectory + "' is present." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-312/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-312/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-312/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-312/verify.bsh Sun May  1 14:19:08 2011
@@ -25,21 +25,21 @@ boolean result = true;
 
 try
 {
-    final File parentDirectory = new File ( basedir, "target/site" );
+    final File parentDirectory = new File( basedir, "target/site" );
     if ( !parentDirectory.exists() || !parentDirectory.isDirectory() )
     {
         System.err.println( "parent is missing or not a directory." );
         return false;
     }
 
-    File parentIndex = new File ( parentDirectory, "index.html" );
+    File parentIndex = new File( parentDirectory, "index.html" );
     if ( !parentIndex.exists() || parentIndex.isDirectory() )
     {
         System.err.println( "no index file in parent or is a directory." );
         return false;
     }
 
-    String content = IOUtil.toString ( new FileInputStream ( parentIndex ), "UTF-8" );
+    String content = FileUtils.fileRead( parentIndex, "UTF-8" );
     int index1 = content.indexOf( "<a href=\"./\" title=\"Parent\">Parent</a>" );
     int index2 = content.indexOf( "<a href=\"inherited/parent\" title=\"parent\">parent</a>" );
     int index3 = content.indexOf( "<a href=\"inherited/${childprop}\" title=\"${childprop}\">${childprop}</a>" );
@@ -50,21 +50,21 @@ try
         return false;
     }
 
-    final File childDirectory = new File ( basedir, "child/target/site" );
+    final File childDirectory = new File( basedir, "child/target/site" );
     if ( !childDirectory.exists() || !childDirectory.isDirectory() )
     {
         System.err.println( "child is missing or not a directory." );
         return false;
     }
 
-    File childIndex = new File ( childDirectory, "index.html" );
+    File childIndex = new File( childDirectory, "index.html" );
     if ( !childIndex.exists() || childIndex.isDirectory() )
     {
         System.err.println( "no index file in child or is a directory." );
         return false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( childIndex ), "UTF-8" );
+    content = FileUtils.fileRead( childIndex, "UTF-8" );
     int index1 = content.indexOf( "<a href=\"../\" title=\"Parent\">Parent</a>" );
     int index2 = content.indexOf( "<a href=\"inherited/parent\" title=\"parent\">parent</a>" );
     int index3 = content.indexOf( "<a href=\"inherited/${childprop}\" title=\"${childprop}\">${childprop}</a>" );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-322/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-322/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-322/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-322/verify.bsh Sun May  1 14:19:08 2011
@@ -28,28 +28,28 @@ try
 {
     // STAGING
 
-    File topLevelDirectory = new File ( basedir, "target/staging" );
+    File topLevelDirectory = new File( basedir, "target/staging" );
     if ( !topLevelDirectory.exists() || !topLevelDirectory.isDirectory() )
     {
         System.err.println( "Staging directory '" + topLevelDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    File moduleDirectory = new File ( topLevelDirectory, "mymodule" );
+    File moduleDirectory = new File( topLevelDirectory, "mymodule" );
     if ( !moduleDirectory.exists() || !moduleDirectory.isDirectory() )
     {
         System.err.println( "Staging module directory '" + moduleDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    File frDirectory = new File ( topLevelDirectory, "fr" );
+    File frDirectory = new File( topLevelDirectory, "fr" );
     if ( !frDirectory.exists() || !frDirectory.isDirectory() )
     {
         System.err.println( "Staging fr directory '" + frDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    File frModuleDirectory = new File ( frDirectory, "mymodule" );
+    File frModuleDirectory = new File( frDirectory, "mymodule" );
     if ( !frModuleDirectory.exists() || !frModuleDirectory.isDirectory() )
     {
         System.err.println( "Staging fr module directory '" + frModuleDirectory + "' is missing or not a directory." );
@@ -58,28 +58,28 @@ try
 
     // DEPLOY
 
-    topLevelDirectory = new File ( basedir, "deploy" );
+    topLevelDirectory = new File( basedir, "deploy" );
     if ( !topLevelDirectory.exists() || !topLevelDirectory.isDirectory() )
     {
         System.err.println( "Deploy directory '" + topLevelDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    moduleDirectory = new File ( topLevelDirectory, "mymodule" );
+    moduleDirectory = new File( topLevelDirectory, "mymodule" );
     if ( !moduleDirectory.exists() || !moduleDirectory.isDirectory() )
     {
         System.err.println( "Staging module directory '" + moduleDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    frDirectory = new File ( topLevelDirectory, "fr" );
+    frDirectory = new File( topLevelDirectory, "fr" );
     if ( !frDirectory.exists() || !frDirectory.isDirectory() )
     {
         System.err.println( "Staging fr directory '" + frDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    frModuleDirectory = new File ( frDirectory, "mymodule" );
+    frModuleDirectory = new File( frDirectory, "mymodule" );
     if ( !frModuleDirectory.exists() || !frModuleDirectory.isDirectory() )
     {
         System.err.println( "Staging fr module directory '" + frModuleDirectory + "' is missing or not a directory." );
@@ -88,28 +88,28 @@ try
 
     // STAGE DEPLOY
 
-    topLevelDirectory = new File ( topLevelDirectory, "staging" );
+    topLevelDirectory = new File( topLevelDirectory, "staging" );
     if ( !topLevelDirectory.exists() || !topLevelDirectory.isDirectory() )
     {
         System.err.println( "Stage deploy directory '" + topLevelDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    moduleDirectory = new File ( topLevelDirectory, "mymodule" );
+    moduleDirectory = new File( topLevelDirectory, "mymodule" );
     if ( !moduleDirectory.exists() || !moduleDirectory.isDirectory() )
     {
         System.err.println( "Staging module directory '" + moduleDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    frDirectory = new File ( topLevelDirectory, "fr" );
+    frDirectory = new File( topLevelDirectory, "fr" );
     if ( !frDirectory.exists() || !frDirectory.isDirectory() )
     {
         System.err.println( "Staging fr directory '" + frDirectory + "' is missing or not a directory." );
         return false;
     }
 
-    frModuleDirectory = new File ( frDirectory, "mymodule" );
+    frModuleDirectory = new File( frDirectory, "mymodule" );
     if ( !frModuleDirectory.exists() || !frModuleDirectory.isDirectory() )
     {
         System.err.println( "Staging fr module directory '" + frModuleDirectory + "' is missing or not a directory." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-354/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-354/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-354/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-354/verify.bsh Sun May  1 14:19:08 2011
@@ -38,7 +38,7 @@ try
         return false;
     }
 
-    File projectInfo = new File ( site, "project-info.html" );
+    File projectInfo = new File( site, "project-info.html" );
     if ( projectInfo.exists() || projectInfo.isDirectory() )
     {
         System.err.println( "project-info.html file is present although it shouldn't, or is a directory." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-456/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-456/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-456/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-456/verify.bsh Sun May  1 14:19:08 2011
@@ -25,21 +25,21 @@ boolean result = true;
 
 try
 {
-    File parentSiteDirectory = new File ( basedir, "target/site" );
+    File parentSiteDirectory = new File( basedir, "target/site" );
     if ( !parentSiteDirectory.exists() || !parentSiteDirectory.isDirectory() )
     {
         System.err.println( "parent site is missing or not a directory." );
         result = false;
     }
 
-    File parentIndex = new File ( parentSiteDirectory, "index.html" );
+    File parentIndex = new File( parentSiteDirectory, "index.html" );
     if ( !parentIndex.exists() || parentIndex.isDirectory() )
     {
         System.err.println( "no index file in parent or is a directory." );
         result = false;
     }
 
-    String content = IOUtil.toString ( new FileInputStream ( parentIndex ), "UTF-8" );
+    String content = FileUtils.fileRead( parentIndex, "UTF-8" );
     int index1 = content.indexOf( "<a href=\"child/index.html\" title=\"MSITE-456 - child\">MSITE-456 - child</a>" );
     int index2 = content.indexOf( "<a href=\"project-info.html\" title=\"Project Information\">Project Information</a>" );
 
@@ -53,28 +53,28 @@ try
     // CHILD
 
 
-    File childDirectory = new File ( basedir, "child" );
+    File childDirectory = new File( basedir, "child" );
     if ( !childDirectory.exists() || !childDirectory.isDirectory() )
     {
         System.err.println( "child is missing or not a directory." );
         result = false;
     }
 
-    File childSiteDirectory = new File ( childDirectory, "target/site" );
+    File childSiteDirectory = new File( childDirectory, "target/site" );
     if ( !childSiteDirectory.exists() || !childSiteDirectory.isDirectory() )
     {
         System.err.println( "child site is missing or not a directory." );
         result = false;
     }
 
-    File childIndex = new File ( childSiteDirectory, "index.html" );
+    File childIndex = new File( childSiteDirectory, "index.html" );
     if ( !childIndex.exists() || childIndex.isDirectory() )
     {
         System.err.println( "no index file in child or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( childIndex ), "UTF-8" );
+    content = FileUtils.fileRead( childIndex, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../index.html\" title=\"MSITE-456 - parent\">MSITE-456 - parent</a>" );
     index2 = content.indexOf( "<a href=\"project-info.html\" title=\"Project Information\">Project Information</a>" );
 

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-537/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-537/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-537/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-537/verify.bsh Sun May  1 14:19:08 2011
@@ -25,7 +25,7 @@ boolean result = true;
 
 try
 {
-    final File stageDeployDirectory = new File ( basedir, "staging" );
+    final File stageDeployDirectory = new File( basedir, "staging" );
     if ( !stageDeployDirectory.exists() || !stageDeployDirectory.isDirectory() )
     {
         System.err.println( "stageDeployDirectory is missing or not a directory." );
@@ -33,7 +33,7 @@ try
     }
 
     // module directory
-    final File moduleDirectory = new File ( stageDeployDirectory, "module" );
+    final File moduleDirectory = new File( stageDeployDirectory, "module" );
     if ( !moduleDirectory.exists() || !moduleDirectory.isDirectory() )
     {
         System.err.println( "stage deploy moduleDirectory is missing or not a directory." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-548/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-548/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-548/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-548/verify.bsh Sun May  1 14:19:08 2011
@@ -25,35 +25,35 @@ boolean result = true;
 
 try
 {
-    File deployDirectory = new File ( basedir, "deploy" );
+    File deployDirectory = new File( basedir, "deploy" );
     if ( !deployDirectory.exists() || !deployDirectory.isDirectory() )
     {
         System.err.println( "deploy directory is missing or not a directory:" + deployDirectory.getAbsolutePath() );
         return false;
     }
 
-    File rootDirectory = new File ( deployDirectory, "MSITE-548" );
+    File rootDirectory = new File( deployDirectory, "MSITE-548" );
     if ( !rootDirectory.exists() || !rootDirectory.isDirectory() )
     {
         System.err.println( "rootDirectory file is missing or not a directory." );
         return false;
     }
 
-    File junkDirectory = new File ( rootDirectory, "junk" );
+    File junkDirectory = new File( rootDirectory, "junk" );
     if ( !junkDirectory.exists() || !junkDirectory.isDirectory() )
     {
         System.err.println( "junkDirectory file is missing or not a directory." );
         return false;
     }
 
-    File module1Directory = new File ( deployDirectory, "module1" );
+    File module1Directory = new File( deployDirectory, "module1" );
     if ( !module1Directory.exists() || !module1Directory.isDirectory() )
     {
         System.err.println( "module1Directory file is missing or not a directory." );
         return false;
     }
 
-    File module2Directory = new File ( deployDirectory, "module-2" );
+    File module2Directory = new File( deployDirectory, "module-2" );
     if ( !module2Directory.exists() || !module2Directory.isDirectory() )
     {
         System.err.println( "module2Directory file is missing or not a directory." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-566/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-566/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-566/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-566/verify.bsh Sun May  1 14:19:08 2011
@@ -32,14 +32,14 @@ try
         result = false;
     }
 
-    File siteDescriptor = new File ( target, "test-1.0-SNAPSHOT-site.xml" );
+    File siteDescriptor = new File( target, "test-1.0-SNAPSHOT-site.xml" );
     if ( !siteDescriptor.exists() || siteDescriptor.isDirectory() )
     {
         System.err.println( "siteDescriptor file is missing from target or is a directory." );
         result = false;
     }
 
-    String content = IOUtil.toString ( new FileInputStream ( siteDescriptor ), "UTF-8" );
+    String content = FileUtils.fileRead( siteDescriptor, "UTF-8" );
     int index1 = content.indexOf( "name=\"${project.name}\"" );
     int index2 = content.indexOf( "<menu name=\"${menu.title}\">" );
     int index3 = content.indexOf( "<!-- a comment -->" );
@@ -57,14 +57,14 @@ try
         result = false;
     }
 
-    File index = new File ( site, "index.html" );
+    File index = new File( site, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "index.html is missing from target or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "MSITE-566 IT" );
     index2 = content.indexOf( "<h5>Documentation</h5>" );
     if ( index1 < 0 || index2 < 0 )

Modified: maven/plugins/trunk/maven-site-plugin/src/it/inheritedMenus/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/inheritedMenus/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/inheritedMenus/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/inheritedMenus/verify.bsh Sun May  1 14:19:08 2011
@@ -25,28 +25,28 @@ boolean result = true;
 
 try
 {
-    File parentDirectory = new File ( basedir, "parentNotAsRef" );
+    File parentDirectory = new File( basedir, "parentNotAsRef" );
     if ( !parentDirectory.exists() || !parentDirectory.isDirectory() )
     {
         System.err.println( "parent is missing or not a directory." );
         result = false;
     }
 
-    File parentSiteDirectory = new File ( parentDirectory, "target/site" );
+    File parentSiteDirectory = new File( parentDirectory, "target/site" );
     if ( !parentSiteDirectory.exists() || !parentSiteDirectory.isDirectory() )
     {
         System.err.println( "parent site is missing or not a directory." );
         result = false;
     }
 
-    File parentIndex = new File ( parentSiteDirectory, "index.html" );
+    File parentIndex = new File( parentSiteDirectory, "index.html" );
     if ( !parentIndex.exists() || parentIndex.isDirectory() )
     {
         System.err.println( "no index file in parent or is a directory." );
         result = false;
     }
 
-    String content = IOUtil.toString ( new FileInputStream ( parentIndex ), "UTF-8" );
+    String content = FileUtils.fileRead( parentIndex, "UTF-8" );
     int index1 = content.indexOf( "<strong>Parent Relative Home Inherited</strong>" );
     int index2 = content.indexOf( "<strong>Parent Relative Home Inherited with dot</strong>" );
     int index3 = content.indexOf( "<a href=\"./\" title=\"Parent Absolute Home Inherited\">Parent Absolute Home Inherited</a>" );
@@ -83,28 +83,28 @@ try
     // CHILD
 
 
-    File childDirectory = new File ( parentDirectory, "childNotAsRef" );
+    File childDirectory = new File( parentDirectory, "childNotAsRef" );
     if ( !childDirectory.exists() || !childDirectory.isDirectory() )
     {
         System.err.println( "child is missing or not a directory." );
         result = false;
     }
 
-    File childSiteDirectory = new File ( childDirectory, "target/site" );
+    File childSiteDirectory = new File( childDirectory, "target/site" );
     if ( !childSiteDirectory.exists() || !childSiteDirectory.isDirectory() )
     {
         System.err.println( "child site is missing or not a directory." );
         result = false;
     }
 
-    File childIndex = new File ( childSiteDirectory, "index.html" );
+    File childIndex = new File( childSiteDirectory, "index.html" );
     if ( !childIndex.exists() || childIndex.isDirectory() )
     {
         System.err.println( "no index file in child or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( childIndex ), "UTF-8" );
+    content = FileUtils.fileRead( childIndex, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../index.html\" title=\"Parent Relative Home Inherited\">Parent Relative Home Inherited</a>" );
     index2 = content.indexOf( "<a href=\"../index.html\" title=\"Parent Relative Home Inherited with dot\">Parent Relative Home Inherited with dot</a>" );
     index3 = content.indexOf( "<a href=\"../\" title=\"Parent Absolute Home Inherited\">Parent Absolute Home Inherited</a>" );
@@ -137,7 +137,7 @@ try
         result = false;
     }
 
-    File childSummary = new File ( childSiteDirectory, "project-summary.html" );
+    File childSummary = new File( childSiteDirectory, "project-summary.html" );
     if ( !childSummary.exists() || childSummary.isDirectory() )
     {
         System.err.println( "no summary file in child or is a directory." );
@@ -148,28 +148,28 @@ try
     // GRANDCHILD
 
 
-    File grandChildDirectory = new File ( childDirectory, "grandChildNotAsRef" );
+    File grandChildDirectory = new File( childDirectory, "grandChildNotAsRef" );
     if ( !grandChildDirectory.exists() || !grandChildDirectory.isDirectory() )
     {
         System.err.println( "grandchild is missing or not a directory." );
         result = false;
     }
 
-    File grandChildSiteDirectory = new File ( grandChildDirectory, "target/site" );
+    File grandChildSiteDirectory = new File( grandChildDirectory, "target/site" );
     if ( !grandChildSiteDirectory.exists() || !grandChildSiteDirectory.isDirectory() )
     {
         System.err.println( "grandchild site is missing or not a directory." );
         result = false;
     }
 
-    File grandChildIndex = new File ( grandChildSiteDirectory, "index.html" );
+    File grandChildIndex = new File( grandChildSiteDirectory, "index.html" );
     if ( !grandChildIndex.exists() || grandChildIndex.isDirectory() )
     {
         System.err.println( "no index file in grandchild or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( grandChildIndex ), "UTF-8" );
+    content = FileUtils.fileRead( grandChildIndex, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../../index.html\" title=\"Parent Relative Home Inherited\">Parent Relative Home Inherited</a>" );
     index2 = content.indexOf( "<a href=\"../../index.html\" title=\"Parent Relative Home Inherited with dot\">Parent Relative Home Inherited with dot</a>" );
     index3 = content.indexOf( "<a href=\"../../\" title=\"Parent Absolute Home Inherited\">Parent Absolute Home Inherited</a>" );
@@ -202,7 +202,7 @@ try
         result = false;
     }
 
-    File grandChildScm = new File ( grandChildSiteDirectory, "source-repository.html" );
+    File grandChildScm = new File( grandChildSiteDirectory, "source-repository.html" );
     if ( !grandChildScm.exists() || grandChildScm.isDirectory() )
     {
         System.err.println( "no source-repository file in grandchild or is a directory." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/site-attach-descriptor/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/site-attach-descriptor/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/site-attach-descriptor/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/site-attach-descriptor/verify.bsh Sun May  1 14:19:08 2011
@@ -32,21 +32,21 @@ try
         return false;
     }
 
-    File siteDescriptor = new File ( target, "site-attach-descriptor-1.0-SNAPSHOT-site.xml" );
+    File siteDescriptor = new File( target, "site-attach-descriptor-1.0-SNAPSHOT-site.xml" );
     if ( !siteDescriptor.exists() || siteDescriptor.isDirectory() )
     {
         System.err.println( "siteDescriptor file is missing from target or is a directory." );
         return false;
     }
 
-    File siteDescriptor = new File ( target, "snapshot-repo/org/apache/maven/plugins/site/its/site-attach-descriptor/1.0-SNAPSHOT/site-attach-descriptor-1.0-SNAPSHOT-site.xml" );
+    File siteDescriptor = new File( target, "snapshot-repo/org/apache/maven/plugins/site/its/site-attach-descriptor/1.0-SNAPSHOT/site-attach-descriptor-1.0-SNAPSHOT-site.xml" );
     if ( !siteDescriptor.exists() || siteDescriptor.isDirectory() )
     {
         System.err.println( "siteDescriptor file is missing from local repository or is a directory." );
         return false;
     }
 
-    File siteDescriptorSwedish = new File ( target, "site-attach-descriptor-1.0-SNAPSHOT-site_sv.xml" );
+    File siteDescriptorSwedish = new File( target, "site-attach-descriptor-1.0-SNAPSHOT-site_sv.xml" );
     if ( !siteDescriptorSwedish.exists() || siteDescriptorSwedish.isDirectory() )
     {
         System.err.println( "siteDescriptorSwedish file is missing from target or is a directory." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/site-deploy/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/site-deploy/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/site-deploy/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/site-deploy/verify.bsh Sun May  1 14:19:08 2011
@@ -32,40 +32,39 @@ try
         return false;
     }
 
-    File siteDirectory = new File ( target, "site-deployed" );
+    File siteDirectory = new File( target, "site-deployed" );
     if ( !siteDirectory.exists() || !siteDirectory.isDirectory() )
     {
         System.err.println( "site file is missing or not a directory." );
         return false;
     }
 
-    File releaseDirectory = new File ( siteDirectory, "releases" );
+    File releaseDirectory = new File( siteDirectory, "releases" );
     if ( !releaseDirectory.exists() || !releaseDirectory.isDirectory() )
     {
         System.err.println( "releaseDirectory file is missing or not a directory." );
         return false;
     }
-    File release163 = new File ( releaseDirectory, "release1.6.3.html" );
+    File release163 = new File( releaseDirectory, "release1.6.3.html" );
     if ( !release163.exists() || release163.isDirectory() )
     {
         System.err.println( "release163 file is missing or a directory." );
         return false;
     }
-    File release16 = new File ( releaseDirectory, "release1.6.html" );
+    File release16 = new File( releaseDirectory, "release1.6.html" );
     if ( !release16.exists() || release16.isDirectory() )
     {
         System.err.println( "release16 file is missing or a directory." );
         return false;
     }
 
-    File download = new File ( siteDirectory, "download.html" );
+    File download = new File( siteDirectory, "download.html" );
     if ( !download.exists() || download.isDirectory() )
     {
         System.err.println( "download.html file is missing or a directory." );
         return false;
     }
-    FileInputStream fis = new FileInputStream ( download );
-    String downloadContent = IOUtil.toString ( fis, "UTF-8" );
+    String downloadContent = FileUtils.fileRead( download, "UTF-8" );
     int indexOf = downloadContent.indexOf( "Download Maven 2.0.7" );
     if ( indexOf < 0)
     {
@@ -73,7 +72,7 @@ try
         return false;
     }
 
-    
+
 }
 catch( IOException e )
 {



Mime
View raw message