Monday, October 27, 2014

Deploying Applications or Libraries to WebLogic Server Using Command Line

In this post, I will list the commands required to deploy apps/libraries to WebLogic Server

1.$ source $ML_HOME/server/bin/setWLSEnv.sh

Deploy Library:


1.$ java weblogic.Deployer -nostage -deploy -library \
2.-adminurl localhost:7001 \
3.-username weblogic -password my_secret \
4.-targets myserver \
5.my_shared_lib.war

Deploy Application:


1.$ java weblogic.Deployer -nostage -deploy \
2.-adminurl localhost:7001 \
3.-username weblogic -password my_secret \
4.-targets myserver \
5.-name myapp.war myapp.war

For development, you will use the "-nostage" mode which means that to deploy the app or library directly from the file system.
Any changes to that file location and a reload from WLS will take effect immediately.

undepoy app or lib

1.$ java weblogic.Deployer -undeploy \
2.-adminurl localhost:7001 \
3.-username weblogic -password my_secret \
4.-targets myserver \
5.-name myapp_or_lib.war