http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1509

*** shadow/1509 Wed Apr 25 11:47:25 2001
--- shadow/1509.tmp.3678        Wed Apr 25 11:47:25 2001
***************
*** 0 ****
--- 1,44 ----
+ +============================================================================+
+ | Project object not fully functional in BuildEvents                         |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1509                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.3                     |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Windows NT/2K           |
+ |     Priority: Medium                    Component: Core                    |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                   |
+ |  Reported By: [EMAIL PROTECTED]                                      |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ For example, in the buildStarted() method of my logger, getName(), 
+ getDefaultTarget(), and getUserProperty("ant.file") on the project object all 
+ return null. 
+ 
+ import org.apache.tools.ant.*;
+ public class TestLogger extends DefaultLogger
+ {
+       public void buildStarted(BuildEvent event)
+       {
+               out.println(event.getProject());
+               out.println(event.getProject().getBaseDir());
+               out.println(event.getProject().getName());
+               out.println(event.getProject().getDefaultTarget());
+               out.println(event.getProject().getUserProperty("ant.file"));
+               out.println(event.getProject().getProperty("ant.file"));
+ 
+               super.buildStarted(event);
+       }
+ }
+ 
+ Output is:
+ 
+ [EMAIL PROTECTED]
+ D:\z\Test2
+ null
+ null
+ null
+ null

Reply via email to