ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject Re: help for buildfile
Date Thu, 22 Mar 2001 09:45:34 GMT
Robert,

I think this should be possible with current Ant by careful passing of
properties.
Firstly, I haven't tried any of what I am about to suggest so feel free to
flame me if it falls over horribly.

Try this in build_tools.xml

<target name="build-toolboxes">
   <antcall target="build-a-toolbox">
      <param name="toolbox.dir" value="toolbox1"/>
    </antcall>
   <antcall target="build-a-toolbox">
      <param name="toolbox.dir" value="toolbox2"/>
    </antcall>
   <antcall target="build-a-toolbox">
      <param name="toolbox.dir" value="toolbox2"/>
    </antcall>
</target>

<target name="build-a-toolbox">
  <ant antfile="build_toolbox" dir="${toolbox.dir}"/>
</target>

You'll need to move the one of the toolbox build files up a level and call
it build_toolbox1.xml. If everything is a relative path, it should work for
all the toolboxes.

Let us know how it goes.

Conor



----- Original Message -----
From: "Robert Davies" <robert.davies@astro.cf.ac.uk>
To: <ant-user@jakarta.apache.org>
Sent: Tuesday, March 20, 2001 3:31 AM
Subject: help for buildfile


> Hi
>
> I am a new user and if anybody could give me some help/advice I would be
> very gratefull.
>
> I am trying to make build file(s) for a project. The structure of the
> project is below:
>
> -build.xml
> -src
>     -build_core.xml
> -classes
> -help
> -toolboxes
>     -build_tools.xml
>     -toolbox1
>         -build_toolbox1.xml
>         -src
>         -classes
>         -help
>     -toolbox2
>         -build_toolbox2.xml
>         -src
>         -classes
>         -help
>     -toolbox3
>         -toolbox3.1
>             -build_toolbox3_1.xml
>             -src
>             -classes
>             -help
>         -toolbox3.2
>             -build_toolbox3_2.xml
>             -src
>             -classes
>             -help
>
> I have a build.xml file in the root directory of the project, build_tools
in
> the toolboxes directory, I also have a seperate buildfile for each of the
> toolboxes and a build_core.xml file which build the main part of the
> project. build.xml calls the build_core.xml the calls the build_tools.xml
> (this then calls the numberous buildfiles to compile the toolboxes). The
> problem I am having is that when a new toolbox is created, a new
buildfile
> has to be written. What I am trying to do is have a global script for the
> toolboxes that will compile all the toolboxes and any new ones (it will
> recurse down the tree for any .java files, compile then to the
appropriate
> classes directory. This would be the same as 'javac -d .../classes
*.java).
> I have tried this but failed. Is this possible with ant? If not then does
> anybody know a build tool that would solve this task?
>
> Thanks for any help.
>
> Rob
>
>


Mime
View raw message