ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Rosengren <>
Subject RE: Build.xml and reuse
Date Fri, 06 Apr 2001 19:53:37 GMT
Is there a way to use an environment variable for the URI in the !ENTITY?
I'm using multiple build.xml files in various sub-directories. 
It would be easier to add new packages to the project without having to
if the relative pathing was correct. 
I tried the obvious (and naive) $MYFILE, but no luck.
Is there a way in XML to tell the parser to substitute an environment


Mark Hewitt <> wrote:

I have per-project and shared xml files to achieve this.

The project build.xml has pieces like this:


<!-- Include standard entities

<!DOCTYPE project [
    <!ENTITY commonProperties SYSTEM "../admin/common.xml">
    <!ENTITY projectProperties SYSTEM "project.xml">
    <!ENTITY commonTargets SYSTEM "../admin/targets.xml">

<!-- Start of project build description

<project name="XXX" default="compile" basedir=".">


<!-- ======================================================================
<!-- Import all the common build targets
<!-- ======================================================================


<!-- ======================================================================
<!-- inclusion : Import all the common and project-specific properties
<!-- ======================================================================
    <target name="inclusion">

Which all works nicely for me!


-----Original Message-----
From: Danil Suits []
Sent: 28 March 2001 20:30
To: ''
Subject: Build.xml and reuse

Has anyone experimented with reusing the targets within the build.xml file?

I frequently find myself wanting to work on only a subsystem of the project.
I could add a new target to the build.xml file - but that publishes my local
work to every developers machine, which isn't appropriate in this case.

What I'm currently considering is moving the contents of the project to a
new file (common.xml), replacing them in build.xml with an XML include, then
creating mybuild.xml which includes common.xml, plus whatever other changes
I need.  build.xml remains under source control, as does common.xml, but
mybuild.xml is not under control.

I'm sure this will work, and I'm also sure that it is kind of clumsy - has
anybody discovered a better way to achieve target reuse?


Eric Rosengren
Aether Systems (RTS Wireless)

View raw message