ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kriens <>
Subject Re[2]: Separation from rules and project specifics. Can it be done?
Date Wed, 11 Jun 2003 16:08:03 GMT
The problem with the entity solution is that it only works from the
first file. You cannot do includes in includes ...

Another issue is, is that the location cannot come from properties
because it is on XML level. You are only allowed to define the entity
BEFORE any text is processed. Really rather limited actually.

I agree it is a start, but as with many things in Ant, it stops short
from really being adequate.

Dont get me wrong, thousands of developers prove every day ant can do
the job ... but imho at the cost of high maintenance because of
unreadability, sensitive to configuration, and its ad-hoc design.

Kind regards,

     Peter Kriens

>> = 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 ...

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

SSOH> I think the documentation is only adequate, but the tool is great.  You
SSOH> 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
SSOH> specific
>> 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. [ ... ]

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

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

SSOH> and adding

SSOH>     &properties;

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

SSOH> I hope that helps some,

SSOH>   -- Scott Sauyet

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

Peter Kriens                              Tel. +46 30039800
Finnasandsvägen 22                        Fax. +46 30039805
SE-43933 Onsala                           Mob. +46705950899

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

View raw message