You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2011/05/01 16:19:11 UTC

svn commit: r1098314 [3/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...

Modified: maven/plugins/trunk/maven-site-plugin/src/it/site-inheritance/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/site-inheritance/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/site-inheritance/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/site-inheritance/verify.bsh Sun May  1 14:19:08 2011
@@ -25,7 +25,7 @@ boolean result = true;
 
 try
 {
-    final File siteDirectory = new File ( basedir, "webhost.company.com" );
+    final File siteDirectory = new File( basedir, "webhost.company.com" );
     if ( !siteDirectory.exists() || !siteDirectory.isDirectory() )
     {
         System.err.println( "site is missing or not a directory." );
@@ -36,7 +36,7 @@ try
     // DEPLOY
 
 
-    final File deployDirectory = new File ( siteDirectory, "deploy" );
+    final File deployDirectory = new File( siteDirectory, "deploy" );
     if ( !deployDirectory.exists() || !deployDirectory.isDirectory() )
     {
         System.err.println( "deployDirectory is missing or not a directory." );
@@ -44,21 +44,21 @@ try
     }
 
     // junk directory (aggregator)
-    File junkDirectory = new File ( deployDirectory, "junk" );
+    File junkDirectory = new File( deployDirectory, "junk" );
     if ( !junkDirectory.exists() || !junkDirectory.isDirectory() )
     {
         System.err.println( "deployed junkDirectory is missing or not a directory." );
         result = false;
     }
 
-    File index = new File ( junkDirectory, "index.html" );
+    File index = new File( junkDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "no index file in deployed junk or is a directory." );
         result = false;
     }
 
-    String content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    String content = FileUtils.fileRead( index, "UTF-8" );
     int indexOf = content.indexOf( "<a href=\"../index.html\" title=\"Aggregator\">Aggregator</a>" );
     if ( indexOf < 0)
     {
@@ -67,14 +67,14 @@ try
     }
 
     // deploy directory (main site)
-    index = new File ( deployDirectory, "index.html" );
+    index = new File( deployDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "no index file in deploy or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     int index1 = content.indexOf( "<a href=\"www/website/deep/down/below/index.html\" title=\"Child and Module\">Child and Module</a>" );
     int index2 = content.indexOf( "<a href=\"inheriting_child/index.html\" title=\"Inheriting Child\">Inheriting Child</a>" );
     int index3 = content.indexOf( "<a href=\"www/website/module/index.html\" title=\"Module\">Module</a>" );
@@ -86,14 +86,14 @@ try
     }
 
     // parent directory
-    File parentDirectory = new File ( deployDirectory, "www/website" );
+    File parentDirectory = new File( deployDirectory, "www/website" );
     if ( !parentDirectory.exists() || !parentDirectory.isDirectory() )
     {
         System.err.println( "deployed parentDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( parentDirectory, "index.html" );
+    index = new File( parentDirectory, "index.html" );
     if ( index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in deployed parent!" );
@@ -101,21 +101,21 @@ try
     }
 
     // child_and_module
-    File deepDownBelow = new File ( parentDirectory, "deep/down/below" );
+    File deepDownBelow = new File( parentDirectory, "deep/down/below" );
     if ( !deepDownBelow.exists() || !deepDownBelow.isDirectory() )
     {
         System.err.println( "deployed deepDownBelow is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( deepDownBelow, "index.html" );
+    index = new File( deepDownBelow, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in deployed deepDownBelow!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../../../../../index.html\" title=\"breadcrumbs Parent\">breadcrumbs Parent</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs /Child\">breadcrumbs /Child</a>" );
     index3 = content.indexOf( "<a href=\"../../../../../index.html\" title=\"links ./Parent\">links ./Parent</a>" );
@@ -127,21 +127,21 @@ try
     }
 
     // inheriting_child
-    File inheritingChild = new File ( deployDirectory, "inheriting_child" );
+    File inheritingChild = new File( deployDirectory, "inheriting_child" );
     if ( !inheritingChild.exists() || !inheritingChild.isDirectory() )
     {
         System.err.println( "deployed inheritingChild is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( inheritingChild, "index.html" );
+    index = new File( inheritingChild, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in deployed inheritingChild!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../index.html\" title=\"breadcrumbs /Parent\">breadcrumbs /Parent</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs ./Child\">breadcrumbs ./Child</a>" );
     index3 = content.indexOf( "<a href=\"../index.html\" title=\"links Parent\">links Parent</a>" );
@@ -153,21 +153,21 @@ try
     }
 
     // module
-    File moduleDirectory = new File ( parentDirectory, "module" );
+    File moduleDirectory = new File( parentDirectory, "module" );
     if ( !moduleDirectory.exists() || !moduleDirectory.isDirectory() )
     {
         System.err.println( "deployed moduleDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( moduleDirectory, "index.html" );
+    index = new File( moduleDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in deployed moduleDirectory!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs Module\">breadcrumbs Module</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"links ./Module\">links ./Module</a>" );
     index3 = content.indexOf( "<a href=\"../sub_module/index.html\" title=\"Sub-Module\">Sub-Module</a>" );
@@ -179,21 +179,21 @@ try
 
 
     // sub_module
-    File subModuleDirectory = new File ( parentDirectory, "sub_module" );
+    File subModuleDirectory = new File( parentDirectory, "sub_module" );
     if ( !subModuleDirectory.exists() || !subModuleDirectory.isDirectory() )
     {
         System.err.println( "deployed subModuleDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( subModuleDirectory, "index.html" );
+    index = new File( subModuleDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in deployed subModuleDirectory!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../module/index.html\" title=\"breadcrumbs /Module\">breadcrumbs /Module</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs ./SubModule\">breadcrumbs ./SubModule</a>" );
     index3 = content.indexOf( "<a href=\"../module/index.html\" title=\"links Module\">links Module</a>" );
@@ -208,7 +208,7 @@ try
     // STAGE
 
 
-    final File stageDirectory = new File ( siteDirectory, "stage" );
+    final File stageDirectory = new File( siteDirectory, "stage" );
     if ( !stageDirectory.exists() || !stageDirectory.isDirectory() )
     {
         System.err.println( "stage directory is missing or not a directory." );
@@ -222,21 +222,21 @@ try
 
 
     // junk directory (aggregator)
-    junkDirectory = new File ( stageDirectory, "junk" );
+    junkDirectory = new File( stageDirectory, "junk" );
     if ( !junkDirectory.exists() || !junkDirectory.isDirectory() )
     {
         System.err.println( "staged junkDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( junkDirectory, "index.html" );
+    index = new File( junkDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "no index file in staged junk or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     int indexOf = content.indexOf( "<a href=\"../index.html\" title=\"Aggregator\">Aggregator</a>" );
     if ( indexOf < 0)
     {
@@ -245,14 +245,14 @@ try
     }
 
     // deploy directory (main site)
-    index = new File ( stageDirectory, "index.html" );
+    index = new File( stageDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "no index file in stage or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     int index1 = content.indexOf( "<a href=\"www/website/deep/down/below/index.html\" title=\"Child and Module\">Child and Module</a>" );
     int index2 = content.indexOf( "<a href=\"inheriting_child/index.html\" title=\"Inheriting Child\">Inheriting Child</a>" );
     int index3 = content.indexOf( "<a href=\"www/website/module/index.html\" title=\"Module\">Module</a>" );
@@ -264,14 +264,14 @@ try
     }
 
     // parent directory
-    parentDirectory = new File ( stageDirectory, "www/website" );
+    parentDirectory = new File( stageDirectory, "www/website" );
     if ( !parentDirectory.exists() || !parentDirectory.isDirectory() )
     {
         System.err.println( "staged parentDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( parentDirectory, "index.html" );
+    index = new File( parentDirectory, "index.html" );
     if ( index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect staged index file in parent!" );
@@ -279,21 +279,21 @@ try
     }
 
     // child_and_module
-    deepDownBelow = new File ( parentDirectory, "deep/down/below" );
+    deepDownBelow = new File( parentDirectory, "deep/down/below" );
     if ( !deepDownBelow.exists() || !deepDownBelow.isDirectory() )
     {
         System.err.println( "staged deepDownBelow is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( deepDownBelow, "index.html" );
+    index = new File( deepDownBelow, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in staged deepDownBelow!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../../../../../index.html\" title=\"breadcrumbs Parent\">breadcrumbs Parent</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs /Child\">breadcrumbs /Child</a>" );
     index3 = content.indexOf( "<a href=\"../../../../../index.html\" title=\"links ./Parent\">links ./Parent</a>" );
@@ -305,21 +305,21 @@ try
     }
 
     // inheriting_child
-    inheritingChild = new File ( stageDirectory, "inheriting_child" );
+    inheritingChild = new File( stageDirectory, "inheriting_child" );
     if ( !inheritingChild.exists() || !inheritingChild.isDirectory() )
     {
         System.err.println( "staged inheritingChild is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( inheritingChild, "index.html" );
+    index = new File( inheritingChild, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in staged inheritingChild!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../index.html\" title=\"breadcrumbs /Parent\">breadcrumbs /Parent</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs ./Child\">breadcrumbs ./Child</a>" );
     index3 = content.indexOf( "<a href=\"../index.html\" title=\"links Parent\">links Parent</a>" );
@@ -331,21 +331,21 @@ try
     }
 
     // module
-    moduleDirectory = new File ( parentDirectory, "module" );
+    moduleDirectory = new File( parentDirectory, "module" );
     if ( !moduleDirectory.exists() || !moduleDirectory.isDirectory() )
     {
         System.err.println( "staged moduleDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( moduleDirectory, "index.html" );
+    index = new File( moduleDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in staged moduleDirectory!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs Module\">breadcrumbs Module</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"links ./Module\">links ./Module</a>" );
     index3 = content.indexOf( "<a href=\"../sub_module/index.html\" title=\"Sub-Module\">Sub-Module</a>" );
@@ -357,21 +357,21 @@ try
 
 
     // sub_module
-    subModuleDirectory = new File ( parentDirectory, "sub_module" );
+    subModuleDirectory = new File( parentDirectory, "sub_module" );
     if ( !subModuleDirectory.exists() || !subModuleDirectory.isDirectory() )
     {
         System.err.println( "staged subModuleDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( subModuleDirectory, "index.html" );
+    index = new File( subModuleDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in staged subModuleDirectory!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../module/index.html\" title=\"breadcrumbs /Module\">breadcrumbs /Module</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs ./SubModule\">breadcrumbs ./SubModule</a>" );
     index3 = content.indexOf( "<a href=\"../module/index.html\" title=\"links Module\">links Module</a>" );
@@ -386,7 +386,7 @@ try
     // STAGE DEPLOY
 
 
-    final File stageDeployDirectory = new File ( siteDirectory, "stage-deploy" );
+    final File stageDeployDirectory = new File( siteDirectory, "stage-deploy" );
     if ( !stageDeployDirectory.exists() || !stageDeployDirectory.isDirectory() )
     {
         System.err.println( "stage-deploy directory is missing or not a directory." );
@@ -399,21 +399,21 @@ try
     //      target/it/site-inheritance/webhost.company.com/deploy/
 
     // junk directory (aggregator)
-    junkDirectory = new File ( stageDeployDirectory, "junk" );
+    junkDirectory = new File( stageDeployDirectory, "junk" );
     if ( !junkDirectory.exists() || !junkDirectory.isDirectory() )
     {
         System.err.println( "stage-deployed junkDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( junkDirectory, "index.html" );
+    index = new File( junkDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "no index file in stage-deployed junk or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     int indexOf = content.indexOf( "<a href=\"../index.html\" title=\"Aggregator\">Aggregator</a>" );
     if ( indexOf < 0)
     {
@@ -422,14 +422,14 @@ try
     }
 
     // deploy directory (main site)
-    index = new File ( stageDeployDirectory, "index.html" );
+    index = new File( stageDeployDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "no index file in stage-deploy or is a directory." );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     int index1 = content.indexOf( "<a href=\"www/website/deep/down/below/index.html\" title=\"Child and Module\">Child and Module</a>" );
     int index2 = content.indexOf( "<a href=\"inheriting_child/index.html\" title=\"Inheriting Child\">Inheriting Child</a>" );
     int index3 = content.indexOf( "<a href=\"www/website/module/index.html\" title=\"Module\">Module</a>" );
@@ -441,14 +441,14 @@ try
     }
 
     // parent directory
-    parentDirectory = new File ( stageDeployDirectory, "www/website" );
+    parentDirectory = new File( stageDeployDirectory, "www/website" );
     if ( !parentDirectory.exists() || !parentDirectory.isDirectory() )
     {
         System.err.println( "stage-deployed parentDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( parentDirectory, "index.html" );
+    index = new File( parentDirectory, "index.html" );
     if ( index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in stage-deployed parent!" );
@@ -456,21 +456,21 @@ try
     }
 
     // child_and_module
-    deepDownBelow = new File ( parentDirectory, "deep/down/below" );
+    deepDownBelow = new File( parentDirectory, "deep/down/below" );
     if ( !deepDownBelow.exists() || !deepDownBelow.isDirectory() )
     {
         System.err.println( "stage-deployed deepDownBelow is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( deepDownBelow, "index.html" );
+    index = new File( deepDownBelow, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in stage-deployed deepDownBelow!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../../../../../index.html\" title=\"breadcrumbs Parent\">breadcrumbs Parent</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs /Child\">breadcrumbs /Child</a>" );
     index3 = content.indexOf( "<a href=\"../../../../../index.html\" title=\"links ./Parent\">links ./Parent</a>" );
@@ -482,21 +482,21 @@ try
     }
 
     // inheriting_child
-    inheritingChild = new File ( stageDeployDirectory, "inheriting_child" );
+    inheritingChild = new File( stageDeployDirectory, "inheriting_child" );
     if ( !inheritingChild.exists() || !inheritingChild.isDirectory() )
     {
         System.err.println( "stage-deployed inheritingChild is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( inheritingChild, "index.html" );
+    index = new File( inheritingChild, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in stage-deployed inheritingChild!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../index.html\" title=\"breadcrumbs /Parent\">breadcrumbs /Parent</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs ./Child\">breadcrumbs ./Child</a>" );
     index3 = content.indexOf( "<a href=\"../index.html\" title=\"links Parent\">links Parent</a>" );
@@ -508,21 +508,21 @@ try
     }
 
     // module
-    moduleDirectory = new File ( parentDirectory, "module" );
+    moduleDirectory = new File( parentDirectory, "module" );
     if ( !moduleDirectory.exists() || !moduleDirectory.isDirectory() )
     {
         System.err.println( "stage-deployed moduleDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( moduleDirectory, "index.html" );
+    index = new File( moduleDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in stage-deployed moduleDirectory!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs Module\">breadcrumbs Module</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"links ./Module\">links ./Module</a>" );
     index3 = content.indexOf( "<a href=\"../sub_module/index.html\" title=\"Sub-Module\">Sub-Module</a>" );
@@ -534,21 +534,21 @@ try
 
 
     // sub_module
-    subModuleDirectory = new File ( parentDirectory, "sub_module" );
+    subModuleDirectory = new File( parentDirectory, "sub_module" );
     if ( !subModuleDirectory.exists() || !subModuleDirectory.isDirectory() )
     {
         System.err.println( "stage-deployed subModuleDirectory is missing or not a directory." );
         result = false;
     }
 
-    index = new File ( subModuleDirectory, "index.html" );
+    index = new File( subModuleDirectory, "index.html" );
     if ( !index.exists() || index.isDirectory() )
     {
         System.err.println( "incorrect index file in stage-deployed subModuleDirectory!" );
         result = false;
     }
 
-    content = IOUtil.toString ( new FileInputStream ( index ), "UTF-8" );
+    content = FileUtils.fileRead( index, "UTF-8" );
     index1 = content.indexOf( "<a href=\"../module/index.html\" title=\"breadcrumbs /Module\">breadcrumbs /Module</a>" );
     index2 = content.indexOf( "<a href=\"index.html\" title=\"breadcrumbs ./SubModule\">breadcrumbs ./SubModule</a>" );
     index3 = content.indexOf( "<a href=\"../module/index.html\" title=\"links Module\">links Module</a>" );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/site-jar/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/site-jar/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/site-jar/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/site-jar/verify.bsh Sun May  1 14:19:08 2011
@@ -34,7 +34,7 @@ try
         return false;
     }
 
-    File siteJar = new File ( target, "site-jar-1.0-SNAPSHOT-site.jar" );
+    File siteJar = new File( target, "site-jar-1.0-SNAPSHOT-site.jar" );
     if ( !siteJar.exists() || siteJar.isDirectory() )
     {
         System.err.println( "siteJar file is missing or a directory." );
@@ -42,7 +42,7 @@ try
     }
 
     String[] fileNames =  new String[] { "images/h3.jpg", "download.html", "index.html", "releases/release1.6.html" };
-    
+
     Set contents = new HashSet();
 
     JarFile jar = new JarFile( siteJar );
@@ -66,7 +66,7 @@ try
         	return false;
         }
     }
-    
+
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-site-plugin/src/it/site-stage-deploy/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/site-stage-deploy/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/site-stage-deploy/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/site-stage-deploy/verify.bsh Sun May  1 14:19:08 2011
@@ -25,7 +25,7 @@ boolean result = true;
 
 try
 {
-    final File deployDirectory = new File ( basedir, "deploy" );
+    final File deployDirectory = new File( basedir, "deploy" );
     if ( !deployDirectory.exists() || !deployDirectory.isDirectory() )
     {
         System.err.println( "deployDirectory is missing or not a directory." );
@@ -33,7 +33,7 @@ try
     }
 
     // junk directory (aggregator)
-    File junkDirectory = new File ( deployDirectory, "junk" );
+    File junkDirectory = new File( deployDirectory, "junk" );
     if ( !junkDirectory.exists() || !junkDirectory.isDirectory() )
     {
         System.err.println( "junkDirectory is missing or not a directory." );
@@ -41,7 +41,7 @@ try
     }
 
     // plugins directory
-    File pluginsDirectory = new File ( deployDirectory, "plugins" );
+    File pluginsDirectory = new File( deployDirectory, "plugins" );
     if ( !pluginsDirectory.exists() || !pluginsDirectory.isDirectory() )
     {
         System.err.println( "deploy pluginsDirectory is missing or not a directory." );
@@ -49,7 +49,7 @@ try
     }
 
     // plugin
-    File mavenRocksDirectory = new File ( pluginsDirectory, "maven-rocks-plugin" );
+    File mavenRocksDirectory = new File( pluginsDirectory, "maven-rocks-plugin" );
     if ( !mavenRocksDirectory.exists() || !mavenRocksDirectory.isDirectory() )
     {
         System.err.println( "deploy mavenRocksDirectory is missing or not a directory." );
@@ -58,7 +58,7 @@ try
 
     // STAGING
 
-    final File stageDirectory = new File ( basedir, "target/staging" );
+    final File stageDirectory = new File( basedir, "target/staging" );
     if ( !stageDirectory.exists() || !stageDirectory.isDirectory() )
     {
         System.err.println( "stageDirectory is missing or not a directory." );
@@ -66,7 +66,7 @@ try
     }
 
     // plugins directory
-    pluginsDirectory = new File ( stageDirectory, "plugins" );
+    pluginsDirectory = new File( stageDirectory, "plugins" );
     if ( !pluginsDirectory.exists() || !pluginsDirectory.isDirectory() )
     {
         System.err.println( "staging pluginsDirectory is missing or not a directory." );
@@ -74,7 +74,7 @@ try
     }
 
     // plugin
-    mavenRocksDirectory = new File ( pluginsDirectory, "maven-rocks-plugin" );
+    mavenRocksDirectory = new File( pluginsDirectory, "maven-rocks-plugin" );
     if ( !mavenRocksDirectory.exists() || !mavenRocksDirectory.isDirectory() )
     {
         System.err.println( "staging mavenRocksDirectory is missing or not a directory." );
@@ -83,7 +83,7 @@ try
 
     // STAGE DEPLOY
 
-    final File stageDeployDirectory = new File ( basedir, "deploy/staging" );
+    final File stageDeployDirectory = new File( basedir, "deploy/staging" );
     if ( !stageDeployDirectory.exists() || !stageDeployDirectory.isDirectory() )
     {
         System.err.println( "stageDeployDirectory is missing or not a directory." );
@@ -91,7 +91,7 @@ try
     }
 
     // plugins directory
-    pluginsDirectory = new File ( stageDeployDirectory, "plugins" );
+    pluginsDirectory = new File( stageDeployDirectory, "plugins" );
     if ( !pluginsDirectory.exists() || !pluginsDirectory.isDirectory() )
     {
         System.err.println( "stage deploy pluginsDirectory is missing or not a directory." );
@@ -99,7 +99,7 @@ try
     }
 
     // plugin
-    mavenRocksDirectory = new File ( pluginsDirectory, "maven-rocks-plugin" );
+    mavenRocksDirectory = new File( pluginsDirectory, "maven-rocks-plugin" );
     if ( !mavenRocksDirectory.exists() || !mavenRocksDirectory.isDirectory() )
     {
         System.err.println( "stage deploy mavenRocksDirectory is missing or not a directory." );

Modified: maven/plugins/trunk/maven-site-plugin/src/it/top-parent-no-site/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/top-parent-no-site/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/top-parent-no-site/verify.bsh (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/top-parent-no-site/verify.bsh Sun May  1 14:19:08 2011
@@ -24,21 +24,21 @@ 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 stageDeployDirectory = new File ( deployDirectory, "staging" );
+    File stageDeployDirectory = new File( deployDirectory, "staging" );
     if ( !stageDeployDirectory.exists() || !stageDeployDirectory.isDirectory() )
     {
         System.err.println( "stageDeployDirectory file is missing or not a directory." );
         return false;
     }
 
-    File stageDirectory = new File ( basedir, "target/staging" );
+    File stageDirectory = new File( basedir, "target/staging" );
     if ( !stageDirectory.exists() || !stageDirectory.isDirectory() )
     {
         System.err.println( "stageDirectory file is missing or not a directory." );

Modified: maven/plugins/trunk/maven-source-plugin/src/it/jar-includes-excludes/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/it/jar-includes-excludes/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/it/jar-includes-excludes/verify.bsh (original)
+++ maven/plugins/trunk/maven-source-plugin/src/it/jar-includes-excludes/verify.bsh Sun May  1 14:19:08 2011
@@ -44,8 +44,8 @@ try
             return false;
         }
     }
-    
-    
+
+
     File jarFile = new File( basedir, "target/jar-1.0-SNAPSHOT-test-sources.jar" );
     System.out.println( "Checking for existence of " + jarFile );
     if ( !jarFile.isFile() )
@@ -84,7 +84,7 @@ try
             return false;
         }
     }
-    
+
 }
 catch( Throwable t )
 {

Modified: maven/plugins/trunk/maven-source-plugin/src/it/jar-with-archive-config/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/it/jar-with-archive-config/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/it/jar-with-archive-config/verify.bsh (original)
+++ maven/plugins/trunk/maven-source-plugin/src/it/jar-with-archive-config/verify.bsh Sun May  1 14:19:08 2011
@@ -43,7 +43,7 @@ try
             return false;
         }
     }
-    
+
     System.out.println( "Checking manifest for attribute: Implementation-Version " );
     Map manifestAttributes = jar.getManifest().getMainAttributes();
     String implVersion = manifestAttributes.getValue( "Implementation-Version" );

Modified: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh Sun May  1 14:19:08 2011
@@ -31,32 +31,31 @@ try
         System.err.println( "target file is missing or not a directory." );
         return false;
     }
-    
+
     File webappDirectory = new File( target, "profile2" );
     if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
     {
         System.err.println( "webappDirectory is missing or not a directory." );
         return false;
-    }    
-    
-    File param = new File ( webappDirectory, "param.jsp" );
+    }
+
+    File param = new File( webappDirectory, "param.jsp" );
     if ( !param.exists() || param.isDirectory() )
     {
         System.err.println( "param.jsp file is missing or a directory." );
         return false;
-    }    
-    System.out.println (" before reading param " );
-    FileInputStream fis = new FileInputStream ( param );
-    String paramContent = IOUtil.toString ( fis );
-    
-    
+    }
+    System.out.println( " before reading param " );
+    String paramContent = FileUtils.fileRead( param );
+
+
     int indexOf = paramContent.indexOf( "<c:set var=\"app_version\" value=\"1.0-SNAPSHOT\"/>" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
         System.err.println( "param.jsp not contains <c:set var=\"app_version\" value=\"1.0-SNAPSHOT\"/>" );
         return false;
     }
-    
+
 }
 catch( Throwable e )
 {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-133/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-133/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-133/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-133/verify.bsh Sun May  1 14:19:08 2011
@@ -31,32 +31,31 @@ try
         System.err.println( "target file is missing or not a directory." );
         return false;
     }
-    
+
     File webappDirectory = new File( target, "MWAR-133-1.0-SNAPSHOT" );
     if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
     {
         System.err.println( "webappDirectory is missing or not a directory." );
         return false;
-    }    
-    
-    File filtered = new File ( webappDirectory, "filtered.properties" );
+    }
+
+    File filtered = new File( webappDirectory, "filtered.properties" );
     if ( !filtered.exists() || filtered.isDirectory() )
     {
         System.err.println( "filtered.properties file is missing or a directory." );
         return false;
-    }    
-    System.out.println (" before reading param " );
-    FileInputStream fis = new FileInputStream ( filtered );
-    String paramContent = IOUtil.toString ( fis );
-    
-    
+    }
+    System.out.println( " before reading filtered.properties" );
+    String paramContent = FileUtils.fileRead( filtered );
+
+
     int indexOf = paramContent.indexOf( "app.version=${node.version}" );
     if ( indexOf < 0)
     {
         System.err.println( "filtered.properties was not filtered with the value of ${node.version}" );
         return false;
     }
-    
+
 }
 catch( Throwable e )
 {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-139/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-139/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-139/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-139/verify.bsh Sun May  1 14:19:08 2011
@@ -31,38 +31,37 @@ try
         System.err.println( "target file is missing or not a directory." );
         return false;
     }
-  
+
     File webappDirectory = new File( target, "MWAR-139-1.0-SNAPSHOT" );
     if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
     {
         System.err.println( "webappDirectory is missing or not a directory." );
         return false;
-    }   
-    
-    File param = new File ( webappDirectory, "filterme.xml" );
+    }
+
+    File param = new File( webappDirectory, "filterme.xml" );
     if ( !param.exists() || param.isDirectory() )
     {
         System.err.println( "filterme.xml file is missing or a directory." );
         return false;
     }
 
-    FileInputStream fis = new FileInputStream ( param );
-    String paramContent = IOUtil.toString ( fis );
-    
+    String paramContent = FileUtils.fileRead( param );
+
     int indexOf = paramContent.indexOf( "<text>hallo @@ hallo</text>" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
         System.err.println( "filterme.xml does not contains <text>hallo @@ hallo</text>" );
         return false;
     }
-    
+
     indexOf = paramContent.indexOf( "<text2>start-${}-end</text2>" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
         System.err.println( "filterme.xml does not contains <text2>start-${}-end</text2>" );
         return false;
-    }    
-    
+    }
+
 }
 catch( Throwable e )
 {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh Sun May  1 14:19:08 2011
@@ -35,15 +35,15 @@ filesAreIdentical( File expected, File c
     try
     {
         byte[] expectedBuffer = IOUtil.toByteArray( expectedIn );
-        
+
         byte[] currentBuffer = IOUtil.toByteArray( currentIn );
-        if (expectedBuffer.length != currentBuffer.length)
+        if ( expectedBuffer.length != currentBuffer.length )
         {
             return false;
         }
-        for (int i = 0,size = expectedBuffer.length;i<size;i++)
+        for ( int i = 0,size = expectedBuffer.length; i<size; i++ )
         {
-            if(expectedBuffer[i]!= currentBuffer[i])
+            if ( expectedBuffer[i] != currentBuffer[i] )
             {
                 return false;
             }
@@ -66,7 +66,7 @@ try
 
     boolean identical = filesAreIdentical( originalImg, targetImg );
 
-    if (!identical)
+    if ( !identical )
     {
         System.err.println( "filtered images are not identical in war-common." );
         return false;
@@ -78,42 +78,41 @@ try
         System.err.println( "target file is missing or not a directory." );
         return false;
     }
-  
+
     File webappDirectory = new File( target, "custom-manifest-1.0-SNAPSHOT" );
     if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
     {
         System.err.println( "webappDirectory is missing or not a directory." );
         return false;
-    }   
-    
-    File param = new File ( webappDirectory, "WEB-INF/classes/filter.properties" );
+    }
+
+    File param = new File( webappDirectory, "WEB-INF/classes/filter.properties" );
     if ( !param.exists() || param.isDirectory() )
     {
         System.err.println( "filter.properties file is missing or a directory." );
         return false;
     }
 
-    
-    FileInputStream fis = new FileInputStream ( param );
-    String paramContent = IOUtil.toString ( fis );
-    
+
+    String paramContent = FileUtils.fileRead( param );
+
     int indexOf = paramContent.indexOf( "debug.test = hello world !" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
         System.err.println( "filter.properties does not contains debug.test = hello world !" );
         return false;
     }
-    
+
     targetImg = new File( basedir, "war-filter-overlay/target/custom-manifest-1.0-SNAPSHOT/duke-beer.jpg" );
 
     boolean identical = filesAreIdentical( originalImg, targetImg );
-    
-    if (!identical)
+
+    if ( !identical )
     {
         System.err.println( "filtered images are not identical with overlay." );
         return false;
-    }    
-    
+    }
+
 }
 catch( Throwable e )
 {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-62/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-62/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-62/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-62/verify.bsh Sun May  1 14:19:08 2011
@@ -31,26 +31,26 @@ try
         System.err.println( "target file is missing or not a directory." );
         return false;
     }
-    File webAppDirectory = new File ( target, "webAppDirectory" );
+    File webAppDirectory = new File( target, "webAppDirectory" );
     if ( !webAppDirectory.exists() || !webAppDirectory.isDirectory() )
     {
         System.err.println( "webAppDirectory is missing or a not directory." );
         return false;
-    }    
-    File devProperties = new File ( webAppDirectory, "dev.properties" );
+    }
+    File devProperties = new File( webAppDirectory, "dev.properties" );
     if ( devProperties.exists() )
     {
         System.err.println( "dev.properties has not been excluded." );
         return false;
     }
-    
-    File testProperties = new File ( webAppDirectory, "test.properties" );
+
+    File testProperties = new File( webAppDirectory, "test.properties" );
     if ( testProperties.exists() )
     {
         System.err.println( "test.properties has not been excluded." );
         return false;
-    }    
-        
+    }
+
 }
 catch( Throwable e )
 {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-96/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-96/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-96/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-96/verify.bsh Sun May  1 14:19:08 2011
@@ -31,22 +31,22 @@ try
         System.err.println( "target file is missing or not a directory." );
         return false;
     }
-  
+
     File webappDirectory = new File( target, "MWAR-96-1.0-SNAPSHOT" );
     if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
     {
         System.err.println( "webappDirectory is missing or not a directory." );
         return false;
-    }   
-    
-    File param = new File ( webappDirectory, "index.jsp" );
+    }
+
+    File param = new File( webappDirectory, "index.jsp" );
     if ( !param.exists() || param.isDirectory() )
     {
         System.err.println( "index.jsp file is missing or a directory." );
         return false;
-    }    
+    }
     String paramContent = FileUtils.fileRead( param );
-    
+
     String javaVersion = System.getProperty( "java.version" );
     int indexOf = paramContent.indexOf( "<td>java version : " + javaVersion + "</td>" );
     if ( indexOf < 0 )
@@ -56,14 +56,14 @@ try
             + paramContent.substring( 0, paramContent.indexOf( "</td>" ) + 5 ) );
         return false;
     }
-    
+
     indexOf = paramContent.indexOf("<td>okitworks</td>" );
     if ( indexOf < 0 )
     {
         System.err.println( "index.jsp not contains <td>okitworks</td>" );
         return false;
     }
-    
+
 }
 catch( Throwable e )
 {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/default/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/default/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/default/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/default/verify.bsh Sun May  1 14:19:08 2011
@@ -14,9 +14,9 @@ try
     }
 
     String[] expectedPaths = {
-            "index.html", 
-            "WEB-INF/classes/org/apache/maven/it0016/Person.class", 
-            "WEB-INF/lib/commons-logging-1.0.3.jar", 
+            "index.html",
+            "WEB-INF/classes/org/apache/maven/it0016/Person.class",
+            "WEB-INF/lib/commons-logging-1.0.3.jar",
     };
     for ( String path : expectedPaths )
     {
@@ -30,7 +30,7 @@ try
     }
 
     String[] unexpectedPaths = {
-            "WEB-INF/lib/servlet-api-2.4.jar", 
+            "WEB-INF/lib/servlet-api-2.4.jar",
     };
     for ( String path : unexpectedPaths )
     {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/scoped-dependency-same-artifact/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/scoped-dependency-same-artifact/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/scoped-dependency-same-artifact/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/scoped-dependency-same-artifact/verify.bsh Sun May  1 14:19:08 2011
@@ -30,49 +30,49 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File webappDirectory = new File( target, "scope-depdency-same-artifact-1.0-SNAPSHOT" );
     if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
     {
         System.err.println( "webappDirectory is missing or not a directory." );
         return false;
-    }    
-    
+    }
+
     File webInfFile = new File( webappDirectory, "WEB-INF/web.xml" );
     if ( !webInfFile.exists() || webInfFile.isDirectory() )
     {
         System.err.println( "webInfFile is missing or a directory." );
         return false;
-    }  
-    
+    }
+
     File indexJsp = new File( webappDirectory, "index.jsp" );
     if ( !indexJsp.exists() || indexJsp.isDirectory() )
     {
         System.err.println( "indexJsp is missing or a directory." );
         return false;
     }
-    
-    File warFile = new File (target, "scope-depdency-same-artifact-1.0-SNAPSHOT.war" );
+
+    File warFile = new File( target, "scope-depdency-same-artifact-1.0-SNAPSHOT.war" );
     if ( !warFile.exists() || warFile.isDirectory() )
     {
         System.err.println( "warFile is missing or a directory." );
         return false;
-    }   
-    
-    File libDir = new File ( webappDirectory, "WEB-INF/lib" );
+    }
+
+    File libDir = new File( webappDirectory, "WEB-INF/lib" );
     if ( !libDir.exists() || !libDir.isDirectory() )
     {
         System.err.println( "WEB-INF/lib is missing or not a directory." );
         return false;
-    }    
-    
-    File plexusUtilsDependency = new File ( libDir, "plexus-utils-1.4.7.jar" );
+    }
+
+    File plexusUtilsDependency = new File( libDir, "plexus-utils-1.4.7.jar" );
     if ( !plexusUtilsDependency.exists() || plexusUtilsDependency.isDirectory() )
     {
         System.err.println( "plexus-utils-1.4.7.jar is missing or a directory." );
         return false;
     }
-    File plexusUtilsSourceDependency = new File ( libDir, "plexus-utils-1.4.7-sources.jar" );
+    File plexusUtilsSourceDependency = new File( libDir, "plexus-utils-1.4.7-sources.jar" );
     if ( !plexusUtilsSourceDependency.exists() || plexusUtilsSourceDependency.isDirectory() )
     {
         System.err.println( "plexus-utils-1.4.7-sources.jar is missing or a directory." );

Modified: maven/plugins/trunk/maven-war-plugin/src/it/simple-war-no-webxml/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/simple-war-no-webxml/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/simple-war-no-webxml/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/simple-war-no-webxml/verify.bsh Sun May  1 14:19:08 2011
@@ -30,48 +30,48 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File webappDirectory = new File( target, "simple-war-no-webxml-1.0-SNAPSHOT" );
     if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
     {
         System.err.println( "webappDirectory is missing or not a directory." );
         return false;
-    }    
-    
+    }
+
     File webInfFile = new File( webappDirectory, "WEB-INF/web.xml" );
     if ( webInfFile.exists())
     {
         System.err.println( "web.xml should not be there." );
         return false;
-    }  
-    
+    }
+
     File indexJsp = new File( webappDirectory, "index.jsp" );
     if ( !indexJsp.exists() || indexJsp.isDirectory() )
     {
         System.err.println( "indexJsp is missing or a directory." );
         return false;
     }
-    
-    File warFile = new File (target, "simple-war-no-webxml-1.0-SNAPSHOT.war" );
+
+    File warFile = new File( target, "simple-war-no-webxml-1.0-SNAPSHOT.war" );
     if ( !warFile.exists() || warFile.isDirectory() )
     {
         System.err.println( "warFile is missing or a directory." );
         return false;
-    }   
-    
-    File libDir = new File ( webappDirectory, "WEB-INF/lib" );
+    }
+
+    File libDir = new File( webappDirectory, "WEB-INF/lib" );
     if ( !libDir.exists() || !libDir.isDirectory() )
     {
         System.err.println( "WEB-INF/lib is missing or not a directory." );
         return false;
-    }    
-    
-    File plexusUtilsDependency = new File ( libDir, "plexus-utils-1.4.6.jar" );
+    }
+
+    File plexusUtilsDependency = new File( libDir, "plexus-utils-1.4.6.jar" );
     if ( !plexusUtilsDependency.exists() || plexusUtilsDependency.isDirectory() )
     {
         System.err.println( "plexus-utils-1.4.6.jar is missing or a directory." );
         return false;
-    }    
+    }
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh Sun May  1 14:19:08 2011
@@ -32,61 +32,60 @@ try
         System.err.println( "target file is missing or a directory." );
         return false;
     }
-    
+
     File webappDirectory = new File( target, "simple-war-project-1.0-SNAPSHOT" );
     if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
     {
         System.err.println( "webappDirectory is missing or not a directory." );
         return false;
-    }    
-    
+    }
+
     File webInfFile = new File( webappDirectory, "WEB-INF/web.xml" );
     if ( !webInfFile.exists() || webInfFile.isDirectory() )
     {
         System.err.println( "webInfFile is missing or a directory." );
         return false;
-    }  
-    
-    
-    
-    FileInputStream fis = new FileInputStream ( webInfFile );
-    String paramContent = IOUtil.toString ( fis );
-    
-    
+    }
+
+
+
+    String paramContent = FileUtils.fileRead( webInfFile, "UTF-8" );
+
+
     int indexOf = paramContent.indexOf( "<display-name>maven test it</display-name>" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "web.xml not contains <display-name>maven test it</display-name>" );
       return false;
-    }    
-    
+    }
+
     File indexJsp = new File( webappDirectory, "index.jsp" );
     if ( !indexJsp.exists() || indexJsp.isDirectory() )
     {
         System.err.println( "indexJsp is missing or a directory." );
         return false;
     }
-    
-    File warFile = new File (target, "simple-war-project-1.0-SNAPSHOT.war" );
+
+    File warFile = new File( target, "simple-war-project-1.0-SNAPSHOT.war" );
     if ( !warFile.exists() || warFile.isDirectory() )
     {
         System.err.println( "warFile is missing or a directory." );
         return false;
-    }   
-    
-    File libDir = new File ( webappDirectory, "WEB-INF/lib" );
+    }
+
+    File libDir = new File( webappDirectory, "WEB-INF/lib" );
     if ( !libDir.exists() || !libDir.isDirectory() )
     {
         System.err.println( "WEB-INF/lib is missing or not a directory." );
         return false;
-    }    
-    
-    File plexusUtilsDependency = new File ( libDir, "plexus-utils-1.4.6.jar" );
+    }
+
+    File plexusUtilsDependency = new File( libDir, "plexus-utils-1.4.6.jar" );
     if ( !plexusUtilsDependency.exists() || plexusUtilsDependency.isDirectory() )
     {
         System.err.println( "plexus-utils-1.4.6.jar is missing or a directory." );
         return false;
-    }    
+    }
 }
 catch( IOException e )
 {

Modified: maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh?rev=1098314&r1=1098313&r2=1098314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh (original)
+++ maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh Sun May  1 14:19:08 2011
@@ -32,32 +32,31 @@ try
         System.err.println( "web/target/example-web/WEB-INF file is missing or a directory." );
         return false;
     }
-    
+
     File jettyEnv = new File( target, "jetty-env.xml" );
     if ( !jettyEnv.exists() || jettyEnv.isDirectory() )
     {
         System.err.println( "jetty-env.xml is missing or a directory." );
         return false;
-    }    
-    
-        
-    FileInputStream fis = new FileInputStream ( jettyEnv );
-    String paramContent = IOUtil.toString ( fis );
-    
-    
+    }
+
+
+    String paramContent = FileUtils.fileRead( jettyEnv, "UTF-8" );
+
+
     int indexOf = paramContent.indexOf( "<Set name=\"URL\">jdbc:oracle:thin:@localhost:1521:orcl</Set>" );
-    if ( indexOf < 0)
+    if ( indexOf < 0 )
     {
       System.err.println( "jdbc.url not filtered correctly" );
       return false;
-    }  
-    
-    indexOf = paramContent.indexOf( "<Set name=\"password\">${jdbc.password}</Set>" );  
-    if ( indexOf < 0)
+    }
+
+    indexOf = paramContent.indexOf( "<Set name=\"password\">${jdbc.password}</Set>" );
+    if ( indexOf < 0 )
     {
       System.err.println( "jdbc.password has been filtered" );
       return false;
-    }   
+    }
 }
 catch( IOException e )
 {