Nagappa L M
Nagappa L M

Reputation: 1480

How to do fast deployment of multiple module EAR project using weblogic 12c?

We are developing product that has multiple components using eclipse which are imported to eclipse from Local Git Repository and we are generating EAR file using ant script build.xml(which calls ant command each component build.xml) and after 1000's of lines of ant script EAR is creating.
But i am working in one component but the after each edit of .java file

  1. Need to Stop webLogic server(Not more time)

  2. Need to go to repository folder

  3. Need to Run ant command on build.xml which is in top-repository folder(15mins)

  4. Need to start webLogic Server(8++min)

And here EAR file Location is fixed every time we run the ant because of all the above lot of my work not moving.Is there any way to do immediate deployment after each edit ??

Hi we have came with ant script that redeploys the *.ear but via ant script it is taking 14 min what i meant is running ant script is slower than redeploying manually here is Is there any alternative to do redeploying faster ?

<project name="webservices-hello_world" default="deploy">
<property name="wls.username" value="weblogic" />
<property name="wls.password" value="Prima123Vera" />
<property name="wls.hostname" value="localhost" />
<property name="wls.port" value="7001" />
<property name="admin.server.name" value="AdminServer" />
<!-- <property name="deploy.target" value="ClusterNameABC" /> -->
<property name="deploy.target" value="AdminServer" />
<!-- Here you can specify Either ClusterName, IndividualServerName Like "ManagedOne" or comma Seperated List of Managed/AdminServer -->
<property name="deploy.name" value="primavera" />
<property name="deploy.source" value="D:/work/rm/pgbu_platform-2.0/snapshots/primavera.ear" />

<!-- Setting TaskDefinition -->
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
<classpath>
<pathelement location="C:/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic.jar"/>
</classpath>
</taskdef>

<!-- Deploying Applications  -->
<target name="deploy">
<wldeploy action="deploy"
          name="${deploy.name}"
          source="${deploy.source}"
          user="${wls.username}"
          nostage="true"
          password="${wls.password}"
          verbose="true"
          adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}" />
</target>

<!-- Redeploying Applications  -->
<target name="redeploy">
<wldeploy action="redeploy"
          name="${deploy.name}"
          user="${wls.username}"
          password="${wls.password}"
          verbose="true"
          adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}" />
</target>

<!-- Uneploying Applications  -->
<target name="undeploy">
<wldeploy action="undeploy"
          name="${deploy.name}"
          failonerror="false"
          user="${wls.username}"
          password="${wls.password}"
          verbose="true"
          adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}" />
</target>
</project>

Upvotes: 3

Views: 3115

Answers (1)

mp_
mp_

Reputation: 695

You can use Auto-Deployment, or more specifically, Auto-Deployment of exploded archives.

The basic procedure would be:

  1. Unpack (explode) the application ear to the auto-deployment directory
  2. Create a REDEPLOY file
  3. Work on your code
  4. Rebuild the specific jar that you modified
  5. Overwrite the old jar in the auto-deployment directory
  6. Change the timestamp of the REDEPLOY file (for example, by recreating it). At this point, weblogic will redeploy your application.
  7. Go to 3.

You can also investigate undeploy and deploy ant tasks, if you can't get the auto-deployment to work these will save you some effort during redeployments.

To reduce build times you will have to investigate incremental builds.

Upvotes: 4

Related Questions