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