ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 1509] - Project object not fully functional in BuildEvents
Date Tue, 24 Feb 2004 13:46:55 GMT
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=1509>.
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=1509

Project object not fully functional in BuildEvents





------- Additional Comments From nwhitehe@yahoo.com  2004-02-24 13:46 -------
Cool. Thanks. I entered a work around:

The uninitialized status of the project (and hence the event) is over by the
time the first task start event fires. For most of my issues, I simply created a
class level boolean in my build listener to track if the event is populated or
not. Then   I defer the buildStarted until the project name comes through.

  public void buildStarted(BuildEvent event) {
    if(event.getProject().getName()==null) return;
    started = true;
    LOG.info("Build Started:" + event.getProject().getName());
  }

  public void targetStarted(BuildEvent event) {
    if(!started) {
      buildStarted(event);
    }
    LOG.info("Target Started:" + event.getProject().getName() + "." +
event.getTarget().getName());
  }

Ugly, but seems to work.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message