Andy2008 schrieb am 29.06.2010 um 12:56 (-0700):
>
> I want to include a number of directories. Below is my code. In
> this example, I only want to include Project1 and Project2 directories
>
> <dirset dir="${svn.src.dir}">
> <include name="Project1/>
> <include name="Project2/>
> </dirset>
>
> Is there a way to put Project1 and Project2 values in one include
> statement instead of having 2 include statements? I will have a lot
> of directories to include.
Use dirset/@includesfile as follows:
G:\dev\Ant :: more /t2 dirset-includesfile.xml
<project>
<dirset id="bla" dir="." includesfile="dirlist.txt"/>
<pathconvert
refid="bla"
pathsep="${line.separator}"
property="bla.blub" />
<echo message="${bla.blub}"/>
</project>
G:\dev\Ant :: type dirlist.txt
test
xmlprop
space dir bla
space dir blub
G:\dev\Ant :: ant -f dirset-includesfile.xml
Buildfile: G:\dev\Ant\dirset-includesfile.xml
[echo] G:\dev\Ant\space dir bla
[echo] G:\dev\Ant\space dir blub
[echo] G:\dev\Ant\test
[echo] G:\dev\Ant\xmlprop
BUILD SUCCESSFUL
> I tried the below but it does not work
Hint: The manual will tell you what will work and what will not.
--
Michael Ludwig
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]