You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Paul Philion <ph...@acmerocket.com> on 2000/07/23 18:13:22 UTC

[PATCH] Minor fix for build.xml

Greetings...

Due to the property immutability thing, the "~/.ant.properties" file
no longer work correctly. More specifically, any value set in
.ant.properties file will not override a value that is set in the
project in the build.xml file.

In short, I'm tired of typing "-Dbuild.compiler=jikes".

I suggest moving the <property file=...> to the top of the project
definition in build.xml, so it's values are set first, and are not
overridden by the properties in build.xml.

That solves my specific problem and allows the <property file> tag to
work as originally intended.

Patch follows...

- Paul Philion

--8<------------------------------------------------

Index: build.xml
===================================================================
RCS file: /home/cvspublic/jakarta-ant/build.xml,v
retrieving revision 1.43
diff -u -r1.43 build.xml
--- build.xml   2000/07/23 15:50:28     1.43
+++ build.xml   2000/07/23 16:02:55
@@ -6,6 +6,10 @@

 <project name="Ant" default="main" basedir=".">

+  <!-- Give user a chance to override without editing this file
+       (and without typing -D each time it compiles it -->
+  <property file="${user.home}/.ant.properties" />
+
   <property name="Name" value="Ant"/>
   <property name="name" value="ant"/>
   <property name="version" value="1.2alpha"/>
@@ -28,10 +32,6 @@
   <property name="manifest" value="src/etc/manifest"/>

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

   <!--
=================================================================== --
>
   <!-- Check to see what optional dependencies are
          -->


RE: [PATCH] Minor fix for build.xml

Posted by Paul Philion <ph...@acmerocket.com>.
Stefan -

Thanks for the tip.

- Paul

> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@bost.de]
> Sent: Monday, July 24, 2000 8:39 AM
> To: ant-dev@jakarta.apache.org
> Subject: Re: [PATCH] Minor fix for build.xml
> 
> 
> Hi Paul,
> 
> going to commit you patch soon.
> 
> >>>>> "PP" == Paul Philion <ph...@acmerocket.com> writes:
> 
>  PP> In short, I'm tired of typing "-Dbuild.compiler=jikes".
> 
> Just another way to achieve this. Adding
> 
> ANT_OPTS=-Dbuild.compiler=jikes
> 
> to ~/.antrc should solve this problem for all your projects.
> 
> Stefan

Re: [PATCH] Minor fix for build.xml

Posted by Stefan Bodewig <bo...@bost.de>.
Hi Paul,

going to commit you patch soon.

>>>>> "PP" == Paul Philion <ph...@acmerocket.com> writes:

 PP> In short, I'm tired of typing "-Dbuild.compiler=jikes".

Just another way to achieve this. Adding

ANT_OPTS=-Dbuild.compiler=jikes

to ~/.antrc should solve this problem for all your projects.

Stefan