ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingo Siebert <ingo.sieb...@cas.de>
Subject Re: howto reuse includes and excludes definitions for different filesets
Date Mon, 10 Dec 2007 10:50:08 GMT
Thank you Dmitri,

it works great.

Ingo

Dmitri Farafonov schrieb:
> Couple ways:
> 
> First use patternset
> http://ant.apache.org/manual/CoreTypes/patternset.html
> <patternset id="my.set">
>   <include name="**/*.java"/>
>   <exclude name="**/*Test*"/>
> </patternset>
> And reuse the pattern:
> <fileset dir="${src.1.dir}" >
>   <patternset refid="my.set"/>
> </fileset>
> <fileset dir="${src.2.dir}" >
>   <patternset refid="my.set"/>
> </fileset>
> 
> Second create includes/excludes files:
> And use includesfile and excludesfile attributes
> http://ant.apache.org/manual/CoreTypes/fileset.html
> <fileset dir="${src.dir}" includesfile="my.includes"
> excludesfile="my.excludes"/>
> 
> Hope it helps,
> 
> Dmitri.
> 
> 2007/12/7, Ingo Siebert <ingo.siebert@cas.de>:
>> Hi,
>>
>> i have to create two files: src.zip and binary.jar .
>>
>> The src.zip contains the source code files and the binary.jar contains
>> the class files.
>>
>> They only contains a _subset_ of my complete project.
>> That's why i have to filesets.
>>
>>
>> <fileset dir="${src.dir}" id="client.src.fileset" >
>>   <include name="de/cas/abc/abcobject/**" />
>>        // ...
>>   <exclude name="**/package.html" />
>> </fileset>
>>
>> <fileset dir="${class.dir}" id="client.class.fileset" >
>>   <include name="de/cas/abc/abcobject/**" />
>>        // ...
>>   <exclude name="**/package.html" />
>> </fileset>
>>
>>
>> But i don't want to maintain the includes and excludes two times in my
>> build file. It there a way the define the includes and excludes only one
>> time?
>>
>> Any great ideas?
>>
>> Ingo
>>

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


Mime
View raw message