If you launch the maven process using Jenkins's built-in maven support, I
don't think you could

If you launch the maven process from a linux shell, Jenkins should use the
exit status of the shell as status for the build step ;
you could then manually override the exit status of the shell after the mvn
command.
I remember doing something like that once, that should do the trick.

However, I would recommand to find a way to have your maven process
terminate correctly. ^^"


2013/1/10 adrien ruffie <adriennolar...@hotmail.fr>

> precisely, the problem is that the main starts other processes in the
> background that prevents correct termination without System.exit ()****
>
> ** **
>
> I cannot ignore result termination of my job ?****
>
> ** **
>
> *De :* jenkinsci-users@googlegroups.com [mailto:
> jenkinsci-users@googlegroups.com] *De la part de* Josselin Pierre
> *Envoyé :* jeudi 10 janvier 2013 09:17
> *À :* jenkinsci-users@googlegroups.com
> *Objet :* Re: Job doesn't finish correctly****
>
> ** **
>
> Hi****
>
> ** **
>
> A System.exit() is a pretty brutal wait to terminate a JVM. ****
>
> It's more or less equivalent to pulling the plug... ****
>
> ** **
>
> Since the JVM didn't shut down nicely, Jenkins considers it as an error.**
> **
>
> ** **
>
> You usually don't need to specify a System.exit on your code ; the java
> process will end itself at the end of the main.****
>
> ** **
>
> Cheers****
>
> ** **
>
> 2013/1/10 adrien ruffie <adriennolar...@hotmail.fr>****
>
> Hello all,****
>
>  ****
>
> I have a Job which launch following maven command :****
>
>  ****
>
> mvn  -B -f /var/lib/jenkins/workspace/Master-Jenkins-Packaging/pom.xml
> generate-resources -Pbuilddb-description-all****
>
>  ****
>
> But when I launch this command in one console of my terminal it’s work and
> finish correctly ****
>
>  ****
>
> Done...........****
>
>  ****
>
>  ****
>
> But Jenkins launch this job with the same command line, job doesn’t finish
> correctly:****
>
>  ****
>
> Done...........****
>
> ERROR: Maven JVM terminated unexpectedly with exit code 0****
>
> Finished : FAILURE****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>
> It’s is very strange, because previous maven command generate a xml file,
> and in twice cases this file is correctly generated,****
>
> But it is really annoying that Jenkins job doesn’t correctly finish …****
>
>  ****
>
> Anyone have an idea ? knowing that: this command launch a java main which
> finish at the end of the main System.exit(0) but****
>
> Not a return is done in main, this way to end the java main can influence
> on the end of Jenkins jobs ? ****
>
> knowing that I haven’t right to modify the way to complete this java main
> and replace System.exit(0) by a return****
>
>  ****
>
>  ****
>
> Great thank, best regards.****
>
>  ****
>
> Adrien****
>
> ** **
>

Reply via email to