ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle Adams" <kad...@gfs.com>
Subject Target Name in Build Listener
Date Thu, 27 Sep 2001 20:36:51 GMT
I've modified the BuildMonitor from the Ant FAQ in order to include the Target name in the
e-mail subject.  Here's the pertinent line of code (e is the BuildEvent passed to the buildFinished
method):

  message.setSubject(status.toUpperCase() + ": " + 
    e.getProject().getName() + "," +
    e.getTarget().getName());

Right now this gets me a NullPointerException instead of an e-mail.  If I remove e.getTarget().getName(),
the e-mail gets sent all hunky dory.  I want to confirm if it's not possible to get the target
name from the event, or if I'm just making a mistake.

Kyle

Mime
View raw message