Index: ../exec-maven-plugin/src/main/java/org/codehaus/mojo/exec/ExecMojo.java =================================================================== --- ../exec-maven-plugin/src/main/java/org/codehaus/mojo/exec/ExecMojo.java (revision 12386) +++ ../exec-maven-plugin/src/main/java/org/codehaus/mojo/exec/ExecMojo.java (revision ) @@ -41,6 +41,7 @@ import org.apache.commons.exec.DefaultExecutor; import org.apache.commons.exec.ExecuteException; import org.apache.commons.exec.Executor; +import org.apache.commons.exec.LogOutputStream; import org.apache.commons.exec.OS; import org.apache.commons.exec.PumpStreamHandler; import org.apache.maven.artifact.Artifact; @@ -307,27 +308,25 @@ exec.setWorkingDirectory( workingDirectory ); - // this code ensures the output gets logged vai maven logging, but at the same time prevents - // partial line output, like input prompts. - // final Log outputLog = getExecOutputLog(); - // LogOutputStream stdout = new LogOutputStream() - // { - // protected void processLine( String line, int level ) - // { - // outputLog.info( line ); - // } - // }; - // - // LogOutputStream stderr = new LogOutputStream() - // { - // protected void processLine( String line, int level ) - // { - // outputLog.info( line ); - // } - // }; - OutputStream stdout = System.out; - OutputStream stderr = System.err; + // this code ensures the output gets logged via maven logging, + // but at the same time prevents partial line output, like input prompts. + final Log outputLog = getExecOutputLog(); + LogOutputStream stdout = new LogOutputStream() + { + protected void processLine( String line, int level ) + { + outputLog.info( line ); + } + }; + LogOutputStream stderr = new LogOutputStream() + { + protected void processLine( String line, int level ) + { + outputLog.info( line ); + } + }; + try { getLog().debug( "Executing command line: " + commandLine ); @@ -343,7 +342,6 @@ catch ( ExecuteException e ) { throw new MojoExecutionException( "Command execution failed.", e ); - } catch ( IOException e ) {