I recently learned to use Jenkins+svn+ant to automatically deploy an ear file. So here's a note on how to automatically deploy an ear file to WebLogic via Ant.
Usually we can publish the application directly via WebLogic, that is, by logging into the WebLogic Web console and uploading the Ear/war file to the server.
Below, we will use ant to implement similar upload ear file functions.
This assumes that the ear file is ready. Focus on how to deploy the ear to weblogic with Ant.
Weblogic.classpath=/oracle/middleware1211c/wlserver_12.1/server/lib/weblogic.jar<property name= " Class.path.oracle.weblogic " value=" ${thirdpartylibs.home.lib}/oracle/weblogic/wls11/wlfullclient.jar " />...<target name= "Deploy_admin_server" depends= "Setup-env,setup-classpath" > <!--&NBSP;STEP1: Defines the class--> <taskdef name= ant task through WebLogic wldeploy Classname= "Weblogic.ant.taskdefs.management.WLDeploy" > <classpath> <pathelement location= "${weblogic.classpath}"/> <pathelement location= "${class.path.oracle.weblogic}" /> </classpath> </taskdef> <!--step2:create ear file -- > <antcall target= "Release" inheritall= "true" inheritrefs= "true" ></antcall> <!--&NBSP;STEP3: Automatic deployment--> <wldeploy action= "Deploy" verbose= "true" debug= "True " name=" Laustoo " source=" ${build.dir.app}${file.separator}${ Name.release}${file.separator}dev-${release.name}.${release.version}.ear " user= "User name" password= "password" adminurl= "t3://localhost:7001" targets= " AdminServer " /></target>
In fact, the ant deployment Ear/war file is a three-step process
1 defines an ant task that WebLogic provides for automatic deployment.
2 generating Ear/war files
3 Call the Wldeploy instruction to automatically deploy Ear/war to Welogic.
Finally, the following Wldeploy parameters are explained briefly
Action: There are three parameters Deploy/redeploy/undeploy
Source: Is the path to the Ear/war file
User:weblogic user name for this domain
Password: password
Adminurl: This is the server's domain name path
Target: Deploy to that server
* * Note here the following in order to fail to connect to WebLogic if the deployment is unsuccessful. There is a need to enable tuneling. This option * * *
This article is from the "Development" blog, make sure to keep this source http://jamesdev.blog.51cto.com/2066624/1774919
Automatically deploy Ear/war files to weblogic12c based on Ant