Posted on

Creating Oracle Weblogic deployment plans

 

Deploying Weblogic applications from the shell

If you are interested in deploying your application using as little as the OS shell, maybe you could take advantage of the weblogic.Deployer class. The prerequisite is that you have added Oracle WebLogic libraries to your classpath by using the setDomainEnv script.

Here are some examples that will illustrate how to use this tool:

How to deploy application on admin server:

java weblogic.Deployer -adminurl url -username username -password

password -name myapp -deploy WLSDemo.ear

How to deploy application with a deployment plan:

java weblogic.Deployer -adminurl url -username username -password

password -name myapp -deploy WLSDemo.ear –plan plan.xml

Deploy a modules on a managed server:

java weblogic.Deployer -adminurl url -username username -password

password -name myapp -targets server1 –deploy WLSDemo.ear

Undeploy application from specified targets:

java weblogic.Deployer -adminurl url -username username -password

password -name myapp -undeploy -targets server1,server2..

Redeploy application on current targets:

java weblogic.Deployer -adminurl url -username username -password

password  -name myapp -redeploy

Redeploy individual module in an application:

java weblogic.Deployer -adminurl url -username username -password

password -name myapp -redeploy -targets moduleA@serverA,moduleA@serverB