开发者

Ant MailLogger problem

I'm trying to establish MailLogger as the principle logger for my ant build. When I launch the ant build, I add the parameters -DMailLogger.properties.file=mail.properties -logger org.apache.tools.ant.listener.MailLogger. When the build finishes, it first tells me it couldn't send the e-mail and then it spits out the call stack:

BUILD SUCCESSFUL
Total time: 1 second
MailLogger failed to send e-mail!
java.lang.NullPointerException
        at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:206)
        at org.apache.tools.ant.listener.MailLogger.sendMimeMail(MailLogger.java:332)
        at org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.java:143)
        at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2037)
        at org.apache.tools.ant.Main.runBuild(Main.java:778)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

If I attempt the same thing without MailLogger.user and MailLogger.password set in mail.properties, it informs me that I wasn't authenticated (and correctly 开发者_高级运维so).

I've included ant-javamail.jar which contains MimeMailer.class and as far as I can tell it's in the classpath along with all the other jars for ant. Perhaps I'm doing something wrong, but NullPointerException is certainly not helping me understand what it is.

I'm using Ant version 1.7.1. Any help would be greatly appreciated! I'm tearing my hair out!


It's an Ant bug - 44999. Looks like it's fixed in Ant 1.8.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜