ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@mad.scientist.com
Subject Re: Defining task-specific properties - what "namespace" should I use?
Date Thu, 14 Sep 2000 09:06:44 GMT
On 14 Sep 2000, Stefan Bodewig wrote:

> >>>>> "NS" == Nico Seessle <nico@seessle.de> writes:
> 
>  NS> Javac (jikes) uses some properties to set options which
>  NS> are available only to jikes and not the other compilers.
> 
> Yes and I'd really like to take it a very different approach to
> it. I've been kicking around this idea for quite some time now, how
> about
> 
> <javac ..>
>   <jikes pedantic="no" emacs="yes" />
> </javac>
> 
> which would be ignored if using a different compiler than jikes.
> 
> Would an approach like this fit your needs?

I don't like it and a lot of people would scream for my
blood. Thou I am a jikes advocate :P not everyone likes it
or has it and this could cause problems.

> Most notably I can easily setup my environment to always call Ant
> with -Dbuild.compiler.emacs=true now, while I'd need to ensure every
> build file has a <jikes> element nested into every <javac> with the
> appropriate setting of the emacs attribute to achieve the same effect.

what I do is put 

  <!--
    Give user a chance to override without editing this file
    (and without typing -D each time he compiles it)
  -->
  <property file=".ant.properties"/>
  <property file="${user.home}/.ant.properties"/>

at the top of each build file I use. This gives the user the
ability to specify both project specific and user specific
properties.

I define all my jikes settings in
${user.home}/.ant.properties as I use it in almost all
projects and project specific properties (like install
directory) in project specific .ant.properties.

Because .ant.properties come first I can also turn of
options like pedantic in projects that don't exactly follow
JLS recomendations (like Apache Turbine).

I haven't downloaded latest Ant with new dynamic properties
but I assume it is just a matter of reordering these in
build file to get this to work.

Cheers,

Pete

*--------------------------------------------------*
| Latrobe University,     | Does the name 'Pavlov' |
| Bundoora, Australia     |    ring a bell ?       |
*--------------------------------------------------*


Mime
View raw message