ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r663046 - in /ant/core/trunk/src/main/org/apache/tools/ant: MagicNames.java Project.java
Date Wed, 04 Jun 2008 10:12:27 GMT
Author: bodewig
Date: Wed Jun  4 03:12:27 2008
New Revision: 663046

URL: http://svn.apache.org/viewvc?rev=663046&view=rev
Log:
make ant.project.name a magic property

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java
    ant/core/trunk/src/main/org/apache/tools/ant/Project.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java?rev=663046&r1=663045&r2=663046&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/MagicNames.java Wed Jun  4 03:12:27 2008
@@ -193,5 +193,14 @@
      */
     public static final String REFID_PROJECT_HELPER = "ant.projectHelper";
 
+    /**
+     * Name of the property holding the name of the currently
+     * executing project, if one has been specified.
+     *
+     * Value: {@value}
+     * @since Ant 1.8.0
+     */
+    public static final String PROJECT_NAME = "ant.project.name";
+
 }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Project.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Project.java?rev=663046&r1=663045&r2=663046&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Project.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Project.java Wed Jun  4 03:12:27 2008
@@ -705,7 +705,7 @@
      *             Must not be <code>null</code>.
      */
     public void setName(String name) {
-        setUserProperty("ant.project.name",  name);
+        setUserProperty(MagicNames.PROJECT_NAME,  name);
         this.name = name;
     }
 



Mime
View raw message