DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9159>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

User Properties set after the BuildStarted event has been fired. (Main.java)

           Summary: User Properties set after the BuildStarted event has
                    been fired. (Main.java)
           Product: Ant
           Version: 1.4.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Listener will not have access to user (command line) properties until after the 
BuildStarted event has been fired.  It would be nice if the listners had access 
to these properties prior to BuildStarted.

Current code snipet of Main.java
        try {
            addBuildListeners(project);

            PrintStream err = System.err;
            PrintStream out = System.out;
            SecurityManager oldsm = System.getSecurityManager();

            try {
                System.setOut(new PrintStream(new DemuxOutputStream(project, 
false)));
                System.setErr(new PrintStream(new DemuxOutputStream(project, 
true)));
                project.fireBuildStarted();
                project.init();
                project.setUserProperty("ant.version", getAntVersion());

                // set user-define properties
                Enumeration e = definedProps.keys();
                while (e.hasMoreElements()) {
                    String arg = (String)e.nextElement();
                    String value = (String)definedProps.get(arg);
                    project.setUserProperty(arg, value);
                }
                
                project.setUserProperty("ant.file" , buildFile.getAbsolutePath
() );



These methods calls should not be made until after the properties have been set.
project.fireBuildStarted();
project.init();

I hope this description is helpful,
Kristopher Keller
678 351-7555

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to