I have a custom Java Maven 2 plug-in where if a certain condition is met, I want the build of the project calling this plug-in to terminate. When I tried putting System.exit(0) into the catch block inside the plug-in, the build did not terminate. When I had put System.exit(0) into the code, the build terminate, but I did not see a Build Failure message, the build process just terminated without any message from Maven. How do I properly cause a build to terminate so that Maven returns the message of the build failing with the total time elapsed. Thank you.
This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]