I am using Jenkins to deploy a war file in GlassFish 4 server.But unable to deploy
war file in Glassfish 4 server.
I am following below process.
But it giv
Example using Windows batchfile
@ECHO OFF
:: BAT START GLASSFISH 5 SERVER
ECHO ============================
ECHO STOPING GLASSFISH 5
ECHO ============================
tasklist | find /i "java.exe" && taskkill /im java.exe /F || echo process "java.exe" not running.
ECHO ============================
ECHO NETWORK INFO
ECHO ============================
ipconfig | findstr IPv4
ECHO ============================
ECHO STARTING GLASSFISH 5
ECHO ============================
ECHO Please wait...
ping 127.0.0.1 -n 10 > nul
net start domain1
ECHO Please wait... Restarting Server
ping 127.0.0.1 -n 90 > nul
exit 0
Running The batchfile:
asadmin --echo=true --host=localhost --port=4848 --user=admin --passwordfile=C:\FilePassGF\passwordfile.txt --secure=false deploy --name "NameWar" --contextroot "NameWar" --force=true "C:\Jenkinshome\deploys\$JOB_NAME\$BUILD_NUMBER\Target-1.0.war"