I have a jenkins job that deploys to a Weblogic 12 server an ear file. When I initially run the job the deployment is successful. But if I want to overwrite the ear file by rerunning the jenkins job, the file is not overwritten. Another version is installed with a -1
at the end of the ear file name.
Is there a configuration that I can use to always overwrite the ear file?
I don't want to redeploy because I will not want 2 versions of the file on the server.
The Jenkins job calls the Weblogic Deployer using this bash command:
"${JAVA_BIN_PATH}"/java -Xms512M -Xmx512M -cp "${WEBLOGIC_PATH}"/server/lib/weblogic.jar weblogic.Deployer \
-debug -stage -remote -verbose -upload \
-source ./<path to ear file>/tms-loadRemote.ear \
-targets $cluster -adminurl t3://$pghAdminConsole \
-username <username> -password <password> -deploy
This correctly deploys and expands the ear file on the servers if there is ear currently on the server. If the jenkins job run again, it creates another instance of the ear file and throws an error that there is an EJB with the same name on the server.