Red and Green Maven Build
call mvn %*
IF ERRORLEVEL 1 goto RedBuild
IF ERRORLEVEL 0 goto GreenBuild
It's quite similar to the one that Crisp posted, so thanks Crisp for the interesting and reusable bat file.
Some small things are different for maven though... Check them out.
Step by step to have it working on your maven project:
- Download this file mvncool.bat (or copy it from the text box above)
- Move mvncool.bat to either:
- the root of your project, where your root pom.xml is. You can also add this file to your version control so that everyone can use it.
- or any folder which is in your PATH. It could be the same folder where mvn.bat is: MAVEN_HOME/bin/.
- From the root of your project, just from where you used to run your mvn you can from now on run mvncool instead. You can send the same parameters mvncool clean install for example and they will be sent through because of the %* on the bat file...
mvn clean install
mvncool clean install