On 6/8/07, Kevin Jackson wrote: > Hi, > > > I was supprised that the you described > > worked for scp, I think that you have removed the > > ant-jsch.jar from from $ANT_HOME/lib. > > Yes as the classloader will find the ant-jsch.jar iin $ANT_HOME/lib > and try to load the jsch code from there. I moved it to a different > location and worked fine - I expected the same behaviour with > , but instead I've had some problems. The ant-email.jar file does not contain the mail task. is not an "optional" task. and is located in ant.jar, however if mime types are used, the EmailTask code will attempt to load MimeMailer (which is in ant-email.jar) by doing the following: mailer = (Mailer) ClasspathUtils.newInstance( "org.apache.tools.ant.taskdefs.email.MimeMailer", EmailTask.class.getClassLoader(), Mailer.class); Which seems a bit pointless from a deployment point of view, but it does allow the EmailTask to get compiled without depending on javamail.jar in the classpath. This means that the moving ant-email.jar from $ANT_HOME/lib will not work. The EmailTask code could be modified to allow a classpath element to be used to load the MimeMailer class (with junittask like classloader tricks), but in the meantime, one can use the cl:classloader task. Peter --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org