Hello Everyone,

I'm using the modified selector to execute a task only if a .xml file
was changed, the modified selector works as expected.

However, I'm trying to get the selector to be in effect only if the
"if" , condition is met. The if condition is there to disable the
selector incase the classes output directory doesn't exist.

The selector seems to take effect regardless of what's in the "if" condition.

Here's a small snippet of the ant build file.

        <available file="output/classes" property="output_dir_exists"
type="dir" value="true"/>

         <selector id="xml_file_modified" if="${output_dir_exists}">
            <modified update="true"
                      seldirs="false"
                      cache="propertyfile"
                      algorithm="digest"
                      comparator="equal">
                <param name="cache.cachefile"     value="cache.properties"/>
                <param name="algorithm.algorithm" value="MD5"/>
            </modified>
          </selector>

     <javac .........>
        <fileset dir="src">
            <selector refid="xml_file_modified"/>
            <includes
        </fileset>
      </javac>

I tried many other things like using the "unless" attribute instead of
"if" attribute.

I also checked the Ant manual.

The version of Ant is 1.7 and JDK 1.6.

Any help is appreciated.

-Regards
Rashmi

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to