14

I want to deploy war/ear file from command line using wslt command into weblogic server. Will any one help on this issue. I need command to do this issue.

Jon Heller
  • 34,999
  • 6
  • 74
  • 132
Obulesu Bukkana
  • 995
  • 4
  • 13
  • 25

3 Answers3

30
 set CLASSPATH=D:\Weblogic\Middleware\wlserver_10.3\server\lib\weblogic.jar

//From remote

 java weblogic.Deployer -adminurl t3://localhost:8001 -user weblogic -password password123 -deploy C:\Users\User\Documents\sample\dist\sample.war -remote -upload

//From normal

 java weblogic.Deployer -adminurl t3://localhost:8001 -username weblogic -password password123 -deploy -name warfilename -targets AdminServer -source C:\apps\sample.war 

by using above stuff it is resolved.

Obulesu Bukkana
  • 995
  • 4
  • 13
  • 25
  • to do this on Linux obviously the paths will be different, but just use `export` instead of `set` – hdost Feb 10 '16 at 16:10
  • Incase someone looking for advance options for deployments, here is the official Oracle documentation for weblogic command line deployments: https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/depgd/deploy.html – Carl Nov 24 '22 at 12:20
2

Just wanted to add for deploying artifacts as shared-library you can use the following:

java weblogic.Deployer -adminurl t3://localhost:7001 -username [Your username] -password [Your password] -upload -library -targets AdminServer -deploy -source [path to your war file]
STaefi
  • 4,297
  • 1
  • 25
  • 43
0
import re
warPath = raw_input('enter warpath:')
appPath = raw_input('enter appname:')
weblogicUrl = raw_input('enter weblogicurl:')
userName = raw_input('enter username:')
password = raw_input('enter password')
connect(userName,password,weblogicUrl)
appList = re.findall(appName, ls('/AppDeployments'))
print(len(appList))
if len(appList) > 0:
undeploy(appName, timeout=60000)  
deploy(appName,warPath,targets='AdminServer')
exit()