I would like to know if there is a way to “request” the Maven runtime from the shell script (used for the build process).
The fact is that I want the entire script assembly to fail as soon as one error appears in one of the Maven shell scripts.
eg.
(0) mvn -f .../someDir clean
(1) mvn -f .../1/pom.xml install
(2) mvn -f .../2/pom.xml -PgenerateWadl
So, if, for example, an error occurs inside (0), then (1) and (2) should no longer be executed, but instead the script assembly should exit with an error message immediately after (0).
I'm not so good at Shell scripts, but I know what $ is? variable to get the return value of earlier execution. But since Maven is simply trying to write errors to the console, this may not work, right?
I would like to research more information about "$?", But for this it is quite difficult to do this.
source
share