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 [EMAIL PROTECTED]  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to