Orangevolt ANT Tasks » Tasks » call
callos.properties

2.8.1.  Example

This example is just a snippet of a real world use of call. First call use: If property yul_present is defined the install-yul target will be executed. Because install-yul depends on target license it is also executed. The snippet contains some more use cases of call. See yourself.

build.xml
...
<target name="prepare" depends="checkup">
      <!-- create property yul_present if a matching file was found with the name of the file as value -->
    <find dir="${tomcat}/common/lib" file="roxes-yul-*.jar" property="yul_present"/>
      
      <!-- call target install-yul if the file exists -->
    <call unless="yul_present" target="install-yul"/>
      
    <input validargs="Install YUL examples,Create new YUL web application,Nothing more" addproperty="option">
      Select optional installations.
    </input>
      
    <compare arg1="${option}" arg2="Install YUL examples">
      <equal property="install-examples"/>
    </compare>
 
    <condition property="windows-integration">
      <and>
       <isset property="install-examples"/>
       <os family="windows"/>
      </and>
    </condition>
    <call if="windows-integration" target="install-windows-integration"/>
 
    <call if="install-examples" target="install-examples"/>
 
    <compare arg1="${option}" arg2="Create new YUL web application">
      <equal property="install-new"/>
    </compare>
    <call if="install-new" target="install-new"/>
  </target>    
    
  <target name="install-yul" depends="license">
    <unzip src="dist/common.zip" dest="${tomcat}/common"/>
  </target>
...