ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject RE: Properties and the <ant> tag
Date Sat, 26 May 2001 13:06:15 GMT
Hi,

At 01:33 PM 5/26/01 +0100, Jose Alberto Fernandez wrote:
>ANT by itself does  not know anything about you deciding to call your
>property ${debug}, and if you were to incorporate building some other
>people's project as part of your main build, you may have the case that for
>them ${debug} could mean "set the product's debug mode" instead of asking
>javac to compile with the debug flag.
>
>So any real solution, cannot just pass things blindly, it needs to
>understand what is going on. 

Just in case you weren't aware there was a proposal to do this via a
"settings" file (ie came before "templating" and presumable "autoconf"
stages - or maybe as part of autoconf). This settings file was proposed to
be a number of things the most popular of which IIRC were as a flat
property file, CSS file or an XML file.

Each of these files would set default values so that if you did not set
them. It was proposed as a way to get rid of magic properties and also to
solve problem you outline.

So instead of setting build.compiler=jikes you would instead have a
settings file that specified javac.compiler=jikes. This means that any task
named javac that the user does not explicitly set compiler attribute for
will have compiler attribute set to jikes. This could of course be extended
to work with any attrribute or element . So you could do setting
javac.debug=true to turn on debug info across all projects (unless build
file explicitly overode it).

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message