I have the following bat script:
@echo off set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_32 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_32\jre set Path=%JAVA_HOME%\bin;%Path% cd C:\project mvn validate compile package db-migration:migrate -DskipTests REM script exits here, the second line never been executed java -jar target/compiled_tar.jar The last line never been executed. The "mvn..." is successfully done, the compiled_tar.jar is created, the output is:
[INFO] BUILD SUCCESS If I insert the PAUSE command between last and previous lines the PAUSE also never been occurred. Why?
mvn … && trueI think cmd may not have a true command see have to replace withecho.(almost the same, but prints a blank line). The trouble with this is you don't know if there was an error. What are the error codes for mvn?