ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: accessing Ant project name
Date Mon, 27 Nov 2000 03:34:27 GMT
Hi,

At 08:21  26/11/00 -0600, you wrote:
>Not right now.  But we can easily add such a property with the following
>patch, which makes the ${project.name} property behave like the
>${basedir} property:
>
>Index: Project.java
>===================================================================
>RCS file:
>/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
>retrieving revision 1.45
>diff -c -r1.45 Project.java
>*** Project.java	2000/11/25 02:38:34	1.45
>--- Project.java	2000/11/27 00:55:32
>***************
>*** 286,291 ****
>--- 286,292 ----
>  
>      public void setName(String name) {
>          this.name = name;
>+         setProperty("project.name", name);

I just changed this to setUserProperty so that the project name is not able
to be overidden easily.

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