You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/01/22 22:41:44 UTC

svn commit: r736805 - /maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java

Author: bentmann
Date: Thu Jan 22 13:41:44 2009
New Revision: 736805

URL: http://svn.apache.org/viewvc?rev=736805&view=rev
Log:
o Included command line in exception messages

Modified:
    maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java

Modified: maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java?rev=736805&r1=736804&r2=736805&view=diff
==============================================================================
--- maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java (original)
+++ maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java Thu Jan 22 13:41:44 2009
@@ -1172,12 +1172,13 @@
 
         allGoals.addAll( goals );
 
+        Commandline cli = null;
         int ret;
 
         File logFile = new File( getBasedir(), getLogFileName() );
         try
         {
-            Commandline cli = createCommandLine();
+            cli = createCommandLine();
 
             for ( Iterator i = envVars.keySet().iterator(); i.hasNext(); )
             {
@@ -1253,7 +1254,7 @@
         }
         catch ( CommandLineException e )
         {
-            throw new VerificationException( e );
+            throw new VerificationException( "Failed to execute Maven: " + cli, e );
         }
         catch ( IOException e )
         {
@@ -1264,8 +1265,8 @@
         {
             System.err.println( "Exit code: " + ret );
 
-            throw new VerificationException(
-                "Exit code was non-zero: " + ret + "; log = \n" + getLogContents( logFile ) );
+            throw new VerificationException( "Exit code was non-zero: " + ret + "; command line and log = \n" + cli
+                + "\n" + getLogContents( logFile ) );
         }
     }