ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <flo...@mindspring.com>
Subject Re: how to call ant on optional subdirs?
Date Wed, 09 Aug 2006 12:24:21 GMT
I suppose you could do something with <available> and set properties, 
then use targets with a if attribute...  That would be somewhat 
kludgy...  Honestly, the ant-contrib solution would be cleaner...

wohlgemuth wrote:
> is suggest you use the if/else task and check if the dir exist in the
> first place?
>
> this should solve your problem.
>
> http://ant-contrib.sourceforge.net/tasks/tasks/if.html
>
> /gert
>
>
> On 8/8/06, John Davis <davisjf@gmail.com> wrote:
>> Hello
>>
>> Currently I have a top-level build.xml file which calls ant on
>> subdirs.  It looks like something like this:
>>
>> <target name="top_build" depends="...">
>>   <ant dir="tools"/>
>>   <ant dir="src" />
>>   <ant dir="tests" />
>>   ...
>> </target>
>>
>>
>> I would like to change the xml so it only builds available
>> directories.  In other words, if a developer uses this build file, he
>> might not be interested in building the tools directory nor the tests
>> directories.  Therefore, he might not have the tools or tests
>> subdirectories.  If he runs ant on the existing build.xml it will
>> break when it tries to execute these steps.
>>
>> In order to fix this, I tried to use the a <dirset> to get the list of
>> available directories ie. tools, src, tests, ... but when I tried to
>> call <ant> on the dirset, it said that it did not support the nested
>> "dirset" element.
>>
>> Any help or suggestions is really appreciated.
>>
>> -- 
>> John F. Davis "JD"
>> http://www.skink.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
>

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


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


Mime
View raw message