ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Questions
Date Fri, 21 Jul 2000 17:24:53 GMT
Dino writes:
> I would like to have an include tag (which references another generic xml
> build file) that gets included into the build file (this is the same with
> the include keyword for makefiles). I'm finding myself writing the exact
> same rules for a number of project with the name of the jar file being
> different.
> A question: where can I find an example of a more complex system using
> (eg having a top level build file with constructs subproject files and
> subproject have build files that have dependencies between subprojects)?

You can do this using XML entities.  Here's a simple example:

<?xml version="1.0"?>

<!DOCTYPE project [
     <!ENTITY usage SYSTEM "usage.ent">
     <!ENTITY zip SYSTEM "zip.ent">
     <!ENTITY compile SYSTEM "compile.ent">
     <!ENTITY dist SYSTEM "dist.ent">
     <!ENTITY test SYSTEM "test.ent">

<project name="mypackage" default="main" basedir=".">

     <!-- Usage -->

     <!-- Zip Targets -->

     <!-- Compile Targets -->

     <!-- Distribution Targets -->

     <!-- Test Targets -->


Then, you build each of your ".ent" (.ent is just a can be
anything) files:

<target name="compile">
     <javac .../>


I hope this helps.


View raw message