You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Farrar, Brian" <Br...@Mindflow.com> on 2000/08/10 19:17:45 UTC

Usage of ant built-in task

I am trying to use ANT to replace traditional makefile.  The example
build.xml files that I have run across (from ant and xalan) show how to
build a project from it's entirety (from  the top level.)  However what I
would like to do is have a build.xml in each subdirectory in the source tree
so that I can build a specific subcomponent when desired.  I sort of figured
that the <ant ...> task would be the way to go but I have a usage that meets
my needs.

Specifically I would like to be able to have a top-level build.xml file
invoke the sub-level build.xml files for the appropriate target.  I would
like to not have the top-level build.xml file be required to specify each
target (sort of a generic target which will propagate downwards.)

Also I would like to be able to give a list of files in each subdirectory to
be built rather than simply building all *.java files.

I am confident that ANT can handle my needs, but unfortunately my thinking
is muddied by decades of Makefiles and I'm having a hard time shifting that
20 cents.

Thanks,

BAF

Re: Usage of ant built-in task

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "FB" == Farrar, Brian <Br...@Mindflow.com> writes:

 FB> I would like to not have the top-level build.xml file be required
 FB> to specify each target (sort of a generic target which will
 FB> propagate downwards.)

I'm not sure I understand taht. The target attribute of <ant> is not
required, the sub projects default target will be used if it is
omitted. Is that what you want?

 FB> Also I would like to be able to give a list of files in each
 FB> subdirectory to be built rather than simply building all *.java
 FB> files.

try to use some <exclude> or <include> elements within the <javac>
task. If the list should be kept external the includesfile and
excludesfile attributes of <javac> may help.

Stefan

Re: Usage of ant built-in task

Posted by Dino Valente <di...@3dstockcharts.com>.
You should follow the discussion with the title :"including other
antfiles". We are discussing this very issue (I have raised this issue
before and I'm doing this again since I believe it is very important area
to figure out.)

dino

At 12:17 PM 8/10/00 -0500, you wrote:
>
>I am trying to use ANT to replace traditional makefile.  The example
>build.xml files that I have run across (from ant and xalan) show how to
>build a project from it's entirety (from  the top level.)  However what I
>would like to do is have a build.xml in each subdirectory in the source tree
>so that I can build a specific subcomponent when desired.  I sort of figured
>that the <ant ...> task would be the way to go but I have a usage that meets
>my needs.
>
>Specifically I would like to be able to have a top-level build.xml file
>invoke the sub-level build.xml files for the appropriate target.  I would
>like to not have the top-level build.xml file be required to specify each
>target (sort of a generic target which will propagate downwards.)
>
>Also I would like to be able to give a list of files in each subdirectory to
>be built rather than simply building all *.java files.
>
>I am confident that ANT can handle my needs, but unfortunately my thinking
>is muddied by decades of Makefiles and I'm having a hard time shifting that
>20 cents.
>
>Thanks,
>
>BAF
>