I’ve been running the built-in Ant from the command line on a Macintosh (10.5.5) and have run into some trouble with the Mail task. Running the Mail task produces the following message:
[mail] Failed to initialise MIME mail: org.apache.tools.ant.taskdefs.email.MimeMailer
This is most likely due to a missing ant-javamail.jar file in the /usr/share/ant/lib directory. I see a ‘ant-javamail-1.7.0.pom’ file in this directory but not the appropriate jar file. Anyone know why this jar file might be missing and what the best way to resolve the problem is?
Here’s what I ended up doing to resolve the problem:
ln -s /usr/local/share/apache-ant-1.7.1/bin/ant /usr/bin/ant)If for some reason you need to make the old version of Ant the default again, just use
ln -s /usr/share/ant/bin/ant /usr/bin/antSteps 2-4 were done at the command prompt as root. That’s it — the Mac now has the latest, complete version of Ant and the Mail task works just fine.