ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: particular fileset question
Date Thu, 19 Jan 2006 05:01:32 GMT
On Wed, 18 Jan 2006, Markus Innerebner
<markus.innerebner@wuerth-phoenix.com> wrote:

> I want to have in my fileset only some jar files located in a
> particular folder. In my example the set should contain only that
> jar files, which are in folderA and folderB
> 
> this is the directory stucture:
> ${lib.dir} ----- folderA
> 	    I--- folderB
> 	    I--- folderC	
> 		
> 
> This example does not work:
> 
> <available file="${lib.dir}/folderA" type="dir"
> property="is.folderA.present"/>
> <available file="${lib.dir}/folderB" type="dir"
> property="is.folderB.present"/>

Not necessary, if the dirs are not there it won't hurt to mention them
in the patterns at all.

> <fileset dir="${lib.dir}">
> 	<include name="**/folderA/*.jar" if="is.folderA.present"/>
> 	<exclude name="**/folderB/*.jar" if="is.folderB.present"/>
> </fileset>

If you said "and" folderB you don't want to exclude that, do you?

It probably should be

<fileset dir="${lib.dir}">
  <include name="folderA/*.jar"/>
  <include name="folderB/*.jar"/>
</fileset>

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message