You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/05/16 16:53:09 UTC
DO NOT REPLY [Bug 9159] New: -
User Properties set after the BuildStarted event has been fired. (Main.java)
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: ant-dev@jakarta.apache.org
ReportedBy: kriskeller@mindspring.com
CC: kriskeller@mindspring.com
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>