I have this .bat script which I use to maven package my application. Problem is, just after it ends execution, it closes the console window. The last 2 lines somehow are completely ignored.
Does anyone know the trick to make this work? I just want to have a quick check if the build was successful.
@echo off
cls
cd C:\svn\project
mvn package -o -P local
sleep 3
pause
Use these commands in batch file to run ur script. Keep your batch file where you pom. xml file is housed set ProjectPath=C:\TetonWorkSpace\PeriodicApplicationCheck cd %ProjectPath% mvn clean test -Dxmlfile=Smoke. xml pause To Create a Task in Task scheduler: 1.
mvn install. This command builds the maven project and installs the project files (JAR, WAR, pom. xml, etc) to the local repository.
You could try to write
call mvn package -o -P local
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With