Powered By Blogger

Friday, February 19, 2016

stopping batch file to exit intermediately while executing maven, grunt commands

Some of the commands will make batch file to exit inbetween. To avoid this we need to have the call statement. Example is as below

@echo off
rem -------
rem Script for apply AMPs to installed WAR
rem -------


set hpi_source_loc=C:\AlfrescoIRM\hpi
set hpi_contextname=hpi1
set consolidatedBuildLocation=C:\ConsolidatedBuild\allbuilds

echo Create the HPI war
cd %hpi_source_loc%


call grunt tomcatDebug --project=patil-employee-onboarding  --contextname=%hpi_contextname% --env=BLRKA3300
echo Completed the creation of Amp for the HPI code , now copy to the location %consolidatedBuildLocation%
xcopy /s "%hpi_source_loc%\DIST\hpi.war" %consolidatedBuildLocation%

echo Completed the HPI war
pause


In the above code call been added