--- On Fri, 3/20/09, Eric Wood <[email protected]> wrote: > From: Eric Wood <[email protected]> > Subject: conditionally set an ANT path reference > To: "Ant Users List" <[email protected]> > Date: Friday, March 20, 2009, 12:08 PM > I'm building a path reference using > the following: > > <path id="classpath.build"> > <path > refid="projectReferences"/> > <fileset > dir="${dir.was.root}/lib"> > <include > name="*.jar"/> > <include > name="*.zip"/> > </fileset> > <fileset dir="${dir.was.root}"> > <include > name="plugins/com.ibm.ws.runtime_6.1.0.jar" /> > </fileset> > <fileset dir="${dir.mq.lib}"> > <include > name="*.jar"/> > <include > name="*.zip"/> > </fileset> > </path> > > > The problem I have is that the dir dir.mq.lib does not > exist on all > servers and when use this path reference to compile, the > compile fails > and states that it can not find the directory in > question. Is there a > way for me to conditionally set the path reference?
One quite simple possibility is that Ant 1.7.0 included a <files> resource that is basically a fileset without a basedir--all members of the set are calculated from include patterns, so if the files don't exist, no harm, no foul. HTH, Matt > > Thanks, Eric > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
