DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21723>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21723 FileSet should have "if" and "unless" Summary: FileSet should have "if" and "unless" Product: Ant Version: 1.5.1 Platform: Sun OS/Version: Solaris Status: NEW Severity: Enhancement Priority: Other Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If the @dir of a <fileset> does not exist, it causes the build to fail, but this causes a problem in the following scenario: 1. my build script needs to accept two env variables. either one (or both) of them need to be present. 2. Those two env vars are used to build a classpath. thus: <path id="classpath"> <fileset dir="${env.VARIABLE1}/lib" includes="*.jar" /> <fileset dir="${env.VARIABLE2}/sub/lib" includes="*.jar" /> </path> 3. this classpath is shared from various targets in the build script, therefore it needs to be defined at the top-level. 4. but if only VARIABLE1 is defined and VARIABLE2 is not, it causes the build failure, and there's no workaround for it. this would have been very simple if I could write: <path id="classpath"> <fileset dir="${env.VARIABLE1}/lib" includes="*.jar" if="env.VARIABLE1"/> <fileset dir="${env.VARIABLE2}/sub/lib" includes="*.jar" if="env.VARIABLE2" /> </path> This feature would have many uses. For example, when I create a zip file, I could change the contents of it based on the build property. Also, little Google search shows that I'm not the only one who'd like to see this feature. See http://ant-contrib.sourceforge.net/fileset.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]