ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: Build file inclusion
Date Sat, 04 Jan 2003 20:23:49 GMT

----- Original Message -----
From: "Jessica P. Hekman" <jphekman@arborius.net>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Saturday, January 04, 2003 06:54
Subject: Re: Build file inclusion

> <import> does sound like exactly what I want, as opposed to <ant> or
> <antcall>. However, I cannot imagine convincing my team leader that our
> project should depend on a CVS version! Does anyone know when 1.6 is due?
> Perhaps we can just wait, if it isn't going to be a really long time.

you can do inclusions today using XML includes -declare the entities in the
header of the build file, then insert them wherever you feel like.

<?xml version="1.0"?>
<!DOCTYPE project [
        <!ENTITY properties SYSTEM "file:xmls/properties.xml">
        <!ENTITY paths  SYSTEM "file:xmls/path_refs.xml">
        <!ENTITY taskdefs SYSTEM "file:xmls/taskdefs.xml">
        <!ENTITY taskdefs_post_compile SYSTEM
"file:xmls/taskdefs_post_compile.xml">
        <!ENTITY targets SYSTEM "file:xmls/targets.xml">
]>
<project name="buildTest" default="printEnv" basedir=".">

      &properties;
      &paths;
      &taskdefs;
      &taskdefs_post_compile;
      &targets;

Its text expansion, more like C #include than anything else, and you cant
use ant properties in the paths to files. But it works now, and will work in
future.

-steve


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


Mime
View raw message