I am writing my first automation script in groovy and I ve hit a roadblock. While making use of the AntBuilder class to run sshexec() I run into the following error:
: Problem: failed to create task or type sshexec
Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.SSHExec was not found.
This looks like one of Ant s optional components.
Action: Check that the appropriate optional JAR exists in
-ANT_HOMElib
-the IDE Ant configuration dialogs
Do not panic, this is a common problem.
The commonest cause is a missing JAR.
This is not a bug; it is a configuration problem
迄今为止,我找到的最佳解决办法是利用这一办法。
Grape.grab(group : "com.jcraft", module : "jsch", classLoader : this.class.classLoader.rootLoader)
Grape.grab(group:"ant", module:"ant-jsch", classLoader:this.class.classLoader.rootLoader)
in order to load the required modules. However, I would like to eliminate the lag time of Grape downloading the jars from the remote Maven repository.
是否有办法下载和节省今后使用的模块,或许可在JAVA_中。 a. 适当或可采用的方法?