You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matthew Milliss <ma...@gmail.com> on 2007/03/04 04:35:39 UTC

Execute specific process on maven success and failure.

Does anyone know if there is a way to execute one of two processes 
dependent on either the success or failure of a maven build. Executng 
the process needs to be independent of the build lifecycle ie doesn't 
matter if it fails at clean or test or deploy, just the fact that maven 
has failed should cause the 'failed' process to execute. The process to 
execute could either be a shell script, an ant task or an ssh command on 
a remote machine.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Execute specific process on maven success and failure.

Posted by Thorsten Heit <th...@gmx.de>.
> Does anyone know if there is a way to execute one of two processes 
> dependent on either the success or failure of a maven build. Executng 
> the process needs to be independent of the build lifecycle ie doesn't 
> matter if it fails at clean or test or deploy, just the fact that maven 
> has failed should cause the 'failed' process to execute. The process to 
> execute could either be a shell script, an ant task or an ssh command on 
> a remote machine.

On Unix machines the following should allow you to do this:

%> mvn compile && echo "Success" || echo "Failure"

On Windows this should also be possible, at least with Cygwin (just checked).


HTH

Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Execute specific process on maven success and failure.

Posted by Matt Milliss <ma...@gmail.com>.
Does anyone know if there is a way to execute one of two processes 
dependent on either the success or failure of a maven build. Executng 
the process needs to be independent of the build lifecycle ie doesn't 
matter if it fails at clean or test or deploy, just the fact that maven 
has failed should cause the 'failed' process to execute. The process to 
execute could either be a shell script, an ant task or an ssh command on 
a remote machine.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org