Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven package .bat script: how to add a delay?

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
like image 684
falmp Avatar asked Feb 11 '09 18:02

falmp


People also ask

How do I run a Maven project in a batch file?

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.

What is the command for Maven build?

mvn install. This command builds the maven project and installs the project files (JAR, WAR, pom. xml, etc) to the local repository.


1 Answers

You could try to write

call mvn package -o -P local
like image 167
schnaader Avatar answered Oct 21 '22 21:10

schnaader