How to quickly deploy multiple modules of an EAR project using weblogic 12c?

We are developing a product with multiple components using eclipse which are imported into eclipse from a local Git repository and we generate an EAR file using ant script build.xml (which calls ant command for every component build .xml) and after 1000 lines of ant script is generated EAR.
But I am working in one component but after every edit of the .java file

  • The webLogic server must be stopped (no more time)

  • You need to go to the repository folder

  • You need to run the ant command in the build.xml file, which is located in the upper storage folder (15 min)

  • WebLogic Server must be running (8 ++ min)

And here the Location EAR file gets captured every time we run ant due to all of the above batches of my work not being moved. Is there a way to do an immediate deployment after every edit?

Hi we came with an ant script that redistributes * .ear, but through the ant script it takes 14 minutes, which I mean under the ant script is slower than manual redistribution here is Is there an alternative to redeploy 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>

      

+3


source to share


1 answer


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

Basic procedure:

  • Unzip (explode) the ear of the application into the automatic deployment directory
  • Create a REDEPLOY file
  • Work on your code.
  • Recover the specific jar you changed.
  • Overwrite old jar in automatic deployment directory
  • Change the timestamp of the REDEPLOY file (for example, by recreating it). At this point weblogic will redeploy your application.
  • Go to 3.


You can also investigate the deployment and deployment of ant tasks , if you can't get the automatic deployment to work, it will save you some effort during redistribution.

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

+4


source







All Articles