ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janez Dovc" <janez.d...@cosylab.com>
Subject writing my own listener
Date Sat, 29 Mar 2003 19:15:44 GMT
Dear all,

I want to send compact build report of my automatic nightly build to
specific email address. So I started to write my own ant listener. For the
time being, I only add few lines of code to 

public void buildFinished(BuildEvent arg0)
	{
		Message message=new Message();
		message.addText("Testing of email task");
		EmailAddress receiver=new EmailAddress();
		receiver.setAddress("janez.dovc@cosylab.com");
		EmailTask email=new EmailTask();
		email.setFrom("janez.dovc@ijs.si");
		email.addTo(receiver);
		email.setSubject("BuildFinished");
		email.addMessage(message);
		email.setMailhost("localhost");
		email.execute();
	}

And I added my listener to ant

/usr/local/ant/bin/ant -listener com.cosylab.ant.CosyListener -logger
org.apache.tools.ant.XmlLogger -logfile
/www/vhosts/java/reports/nightly/$logfile.xml etc.

XMLLogger successfully creates his log file, but my listener doesn't respond
- no email is sent.

What am I doing wrong?

Best regards,

Janez



Mime
View raw message