I know it is possible to fail a build when executing a groovy script by throwing a runtime exception but I am wondering if there is another way to do that for the following reasons:
You need to log an error if you want the message to appear using the standard maven logging and when you throw the runtime exception, this creates a very long and confusing error message.
Is it possible to fail the build using a more maven standard way? I tried System,.exit(1) and that exists immediately, not good. I tried return(1) but it has not effect.