'org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye

I have called System.exit(0) in my class and getting this error trace in jenkins, using maven

Process Exit Code: 0
org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?

How can i get success build using System.exit(0)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source