Deploy to weblogic using maven and jenkins

Manish Joshi picture Manish Joshi · May 10, 2013 · Viewed 13.4k times · Source

We are using Jenkins in our project for build and deployment on dev environments. I have sucessfullly created a war file using maven in jenkins and now I have to create another job to deploy that war file into the weblogic server.

However, I am not aware of the required steps for configuring this job in jenkins. Will it be a matter of just invoking a maven deploy command? Can some one please tell me what will be the required steps to deploy a war file into weblogic 10.3.5 using jenkins?

edit : The approach we are following is after creating the war file we are cheking the war file created into svn and then the deploy job will take the war file from there and deploy it into the weblogic. Does some one thing there is a better way of doing thhings than this?

Thanks, Manish

Answer

osman picture osman · May 13, 2013

Use the Jenkins "Weblogic Deployer Plugin". This will do the deployment for you. All you need to do is specify:

  • Task Name: Give the deployment a name; Eg. Webapp WL Deployment

  • Environment: Specify the environment you are deploying to. Make sure you are using the AdminServer port number and not the Managed Server port number; default is 7001

  • Name: The name weblogic should use for your webapp to display the deployed component

  • Built resource to deploy: The file name of your webapp. You can use also use regular expressions for this

  • Targets: The name of the managed server you want to deploy the webapp to

  • Weblogic libraries: Whether or not the webapp should be deployed as a library component.