ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: conditionally set an ANT path reference
Date Sat, 21 Mar 2009 19:00:56 GMT

--- On Fri, 3/20/09, Eric Wood <EWood@llbean.com> wrote:

> From: Eric Wood <EWood@llbean.com>
> Subject: conditionally set an ANT path reference
> To: "Ant Users List" <user@ant.apache.org>
> 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message