maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-core-it-verifier/src/main/java/org/apache/maven/it Verifier.java
Date Thu, 24 Feb 2005 05:39:31 GMT
brett       2005/02/23 21:39:31

  Modified:    maven-core-it-verifier/src/main/java/org/apache/maven/it
                        Verifier.java
  Log:
  show log file contents when verification fails
  
  Revision  Changes    Path
  1.22      +24 -1     maven-components/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java
  
  Index: Verifier.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Verifier.java	29 Dec 2004 20:20:48 -0000	1.21
  +++ Verifier.java	24 Feb 2005 05:39:31 -0000	1.22
  @@ -11,6 +11,7 @@
   import java.io.FileReader;
   import java.io.FileWriter;
   import java.io.InputStream;
  +import java.io.IOException;
   import java.io.PrintStream;
   import java.io.Writer;
   import java.net.URL;
  @@ -370,6 +371,26 @@
           }
       }
   
  +    private void displayLogFile()
  +    {
  +        System.out.println( "Log file contents:" );
  +        try
  +        {
  +            BufferedReader reader = new BufferedReader( new FileReader( new File( basedir,
"log.txt" ) ) );
  +            String line = reader.readLine();
  +            while ( line != null )
  +            {
  +                System.out.println( line );
  +                line = reader.readLine();
  +            }
  +            reader.close();
  +        }
  +        catch ( IOException e )
  +        {
  +            System.err.println( "Error: " + e );
  +        }
  +    }
  +
       // ----------------------------------------------------------------------
       //
       // ----------------------------------------------------------------------
  @@ -434,6 +455,8 @@
   
                   e.printStackTrace();
   
  +                verifier.displayLogFile();
  +
                   exitCode = 1;
               }
           }
  
  
  

Mime
View raw message