Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Calling an ant script from Java

User384799Apr 10 2014 — edited Feb 26 2020

I have a custom ant script which is calling the ant-sca-deploy.xml file

<ant antfile="${oracle.home}/bin/ant-sca-deploy.xml" inheritAll="false"

         target="deploy">

      <property name="wl_home" value="${wl_home}"/>

      <property name="oracle.home" value="${oracle.home}"/>

      <property name="serverURL" value="${deploy.serverURL}"/>

      <property name="user" value="${deploy.user}"/>

      <property name="password" value="${deploy.password}"/>

      <property name="overwrite" value="${deploy.overwrite}"/>

      <property name="forceDefault" value="${deploy.forceDefault}"/>

      <property name="sarLocation"

                value="${mds.deploy.dir}/${download.description}_mds.zip"/>

    </ant>

This custom ant script i am calling from Java.

The script works fine and enter to ant-sca-deploy.xml but it fails in the very first line of the ant-sca-deploy.xml

file:C:/Oracle/Jdev7/jdeveloper/bin/ant-sca-deploy.xml:12: Unexpected element "condition"

---> Here Condition is the first block in the ant-sca-deploy.xml file

    <condition property="oracle.home" value="${basedir}/..">

         <not>

            <isset property="oracle.home"/>

         </not>

      </condition>

so if i will comment this line the error will change to

file:C:/Oracle/Jdev7/jdeveloper/bin/ant-sca-deploy.xml:12: Unexpected element "condition"

which is the next line in the ant-sca-deploy.xml

      <import file="ant-soa-common.xml"/>

====

I tried to add taskdef

  <taskdef resource="net/sf/antcontrib/antlib.xml" >

but it gives a different error "taskdef class "ignore"/> cannot be found"

I have following jars added to my library

Ant,XercesImpl and Ant-contrib*.jar

Please let me know if i am missing something over here , I tried my luck with all online resources but with no luck.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 12 2014
Added on Apr 10 2014
1 comment
1,286 views