Simply, what's the best (quickest) way to deploy an application (EAR), in a development environment, to two Weblogic 10 managed servers that are part of a cluster? I've tried the autodeploy directory, but as I understand it that only deploys to the admin server.
I was already using ant for building the project so the most efficient thing seemed to be using the ANT deployment scripts for weblogic. The only issue I had was getting the WLDeploy task to be defined. I originally include all the jars in the weblogic server library, but then after some googling narrowed it down to the two you see. I'm didn't check to see if both are actually necessary, but it's working this way. I'll go back and double check later.
<target name="deploy">
<path id="wl.deploy.path">
<fileset file="${env.WL_HOME}\server\lib\weblogic.jar" />
<fileset file="${env.WL_HOME}\server\lib\webservices.jar" />
</path>
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
<classpath refid="wl.deploy.path" />
</taskdef>
<wldeploy
action="deploy" verbose="false" debug="false"
name="${ear.name}" source="${deploy.dir}/goip.ear"
user="weblogic" password="weblogic"
adminurl="t3://localhost:7001" targets="GO_Cluster1">
</wldeploy>
</target>
I also tried using the hotdeploy directory, but as I understand it that directory only deploys to the admin server, not to a cluster, so it didn't fit my needs.
There are ant
tasks available to deploy to WebLogic.
This article is a bit dated but the tools still exist for more modern versions as far as I know.
You know there's a "manager" application (aka the WebLogic Console)? The ant
task basically uses that like a Web Service to do the same kind of operations you'd do by hand in the (Web) Console.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With