o Included command line in exception messages
git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@736805 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/it/Verifier.java b/src/main/java/org/apache/maven/it/Verifier.java
index d59ce23..df99fc9 100644
--- a/src/main/java/org/apache/maven/it/Verifier.java
+++ b/src/main/java/org/apache/maven/it/Verifier.java
@@ -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 ) );
}
}