How to deploy a war file in GlassFish 4 server Using Jenkins

后端 未结 3 1484
谎友^
谎友^ 2021-01-22 12:18

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

3条回答
  •  爱一瞬间的悲伤
    2021-01-22 12:44

    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"
    

提交回复
热议问题