ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milind Nirgun" <>
Subject RE: Need help with javadoc task
Date Wed, 24 Jul 2002 19:13:41 GMT
> Now I still can't figure
> out how to conditionally include
> "${env.JAVA_HOME}/src" in the sourcepath for the
> javadoc statement only when such a directory exists. 

Try this:
    <target name="set_java_src" >
      <available file="${env.JAVA_HOME}/src" type="dir" property="java.src.present" />
    <target name="check_java_src" depends="set_java_src" if="java.src.present" >
      <echo message="java.src exists" />

Run check_java_src target, it will run only if the dir ${env.JAVA_HOME}/src exists. If you
need an alternate branch define another target with an unless="java.src.present" attribute.
You can use this structure around your javadoc tasks.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message