ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <>
Subject RE: Re[2]: Separation from rules and project specifics. Can it be done?
Date Wed, 11 Jun 2003 16:11:28 GMT
I believe that in 1.6, there is an <import> task that overcomes these limitations.

-----Original Message-----
From: Peter Kriens [] 
Sent: Wednesday, June 11, 2003 11:08 AM
To: Sauyet, Scott (OTS-HAR)
Subject: Re[2]: Separation from rules and project specifics. Can it be done?

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

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

SSOH> I think the documentation is only adequate, but the tool is great.  
SSOH> You are certainly right when mentioning the possibility of DTD for 
SSOH> 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 
SSOH> Development with Ant_, it might be worth the price.  They cover a 
SSOH> number of techniques for sharing parts of a build.  One of the 
SSOH> most interesting is the use of XML entities.  By declaring, for 
SSOH> 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 
SSOH> "properties.xml file inside this project.  You can make this as 
SSOH> granular as you like.  I don't know if this will help with your 
SSOH> specific problems, but it is a useful technique.

SSOH> I hope that helps some,

SSOH>   -- Scott Sauyet

SSOH> ------------------------------------------------------------------
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:

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

View raw message