ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Vaughn <>
Subject Re: Some thoughts about runtime evaluation of properties
Date Wed, 26 Jul 2000 13:51:16 GMT
Laird Nelson wrote:

> Again, am I making sense?  :-)  Or am I just rambling?  Well, I know I'm
> just rambling, but hopefully there's something in there.  I'm just intrigued
> by the idea of using XML tags, which seem perfectly suited to the job, for
> creating a...a...file? section? something else? that looks like this:
>   <platform name="Solaris Optimized">
>     <toolset name="JDK" version="1.2.2" vendor="Sun">
>       <tool name="java" universal-flags="">
>         <location filepath="/usr/local/bin/java" />
>       </tool>
>       <tool name="javac" universal-flags="">
>         <location filepath="/usr/local/bin/javac" />
>       </tool>
>     </toolset>
>     <property name="whatever" value="something platform specific">
>     <tool-configuration name="javac">
>       <flag>-deprecation</flag>
>       ...etc...
>     </tool-configuration>
>   </platform>
> ...and then (ick; the tool-configuraiton element sucks; you'll see what I'm
> doing with it in a sec.) your buildfiles' tasks would somehow reference this
> platform description instead of embedding the flags and settings and
> libraries and all that platform information separately:
>   <target name="go">
>     <!-- All tasks could get at their platform description or build
> context -->
>     <!-- automagically -->
>     <javac blah blah blah>
>   </target>
> Blugh.  Does that make sense?  I think I'll work on this and see if it's
> feasible.  Discussion/comments encouraged.
> Cheers,
> Laird

You could *conceivably* get away with this now using XSLT.  Place the platform
description in one file, the build targets in another, and use XSLT to massage
them into one Ant file.  The danger, of course, is that without a spec for the
platform description, few people would ever do this the same way.

View raw message