ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sauyet, Scott (OTS-HAR)" <>
Subject RE: Separation from rules and project specifics. Can it be done?
Date Wed, 11 Jun 2003 14:26:27 GMT
> = Peter Kriens <>

> [Ant's] XML is VERY hard to read and understand. What used to be a few
> words becomes many lines in XML (I have quite a bit of
> experience with XML because I am a heavy XSLT coder (which has the
> same readability problem imho)). Using XML for this purpose looks
> like going back to pre-fortran ...

That's very interesting.  I'm fairly new to Ant; I find the XML used
extrememly easy to understand.  The build files I've read have made it
quite simple for me to understand what's going into a project, and how
it interrelates.  And I'm able to create my own without significant 
hitches.  Mind you, I'm doing fairly small projects here.  Only twice
in the eight months I've been actively using Ant have I needed to ask
this list for help.  Both answers were to be found in the documentation,
although neither in what I think an obvious place.

I think the documentation is only adequate, but the tool is great.  You
are certainly right when mentioning the possibility of DTD for each task.

> However, my main problem is the golden software rule: Only define
> things ONCE. For some reason it seems almost impossible to define the
> information at one place and place the rules in a file that is shared. I
> have to make a lot of similar components (OSGi bundles) and my
> current make files for each bundle are extremely clean without any rules
> (which allows me to redefined and add rules later). I tried
> hard, but in ANT it looks like ANT is fighting this approach tooth
> and nail. [ ... ]

If you haven't seen Erik Hatcher and Steve Loughran's _Java Development
with Ant_, it might be worth the price.  They cover a number of techniques
for sharing parts of a build.  One of the most interesting is the use of
XML entities.  By declaring, for instance,

    <!DOCTYPE project [
        <!ENTITY properties SYSTEM "file:../properties.xml">

and adding


inside your project, you can incorporate the entire "properties.xml file
inside this project.  You can make this as granular as you like.  I don't
know if this will help with your specific problems, but it is a useful

I hope that helps some,

  -- Scott Sauyet

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message