How to deploy EAR in WebSphere Application Server using Jython script?

user3442562 picture user3442562 · Oct 15, 2014 · Viewed 9.5k times · Source

How to deploy application in WebSphere Application Server using Jython script? What is happening during ear file deployment?. Could you please explain it step by step?

Answer

Gas picture Gas · Oct 16, 2014

The shortest form of the script would be:

AdminApp.install('fullpath/yourApp.ear', ['-MapWebModToVH', [['.*', '.*', 'default_host']]])
AdminConfig.save()

During the process application is validated, uploaded to the server and expanded (by default in the installeApps folder. AdminConfig.save() commits the changes done by the script. If you want just to test the script, you can call AdminConfig.reset() to discard any changes.

See documentation for all the details and options: