I can do SCP task while i add jsch-0.1.44.jar to ant/lib directory.But i want to load from the local lib dir and add it to classpath.Could you please help
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The built-in tasks have limited options for customizing the classpath.
1) Place your custom jars in the ${user.home}/.ant/lib directory
/home/mark/.ant
└── lib
├── ivy.jar
└── jsch.jar
This is where I install jars that are my personal extensions to the standard ANT distro
2) Supply the location of the jar directory on the commandline
ant -lib /path/to/jsh/jar
3) You could try to declare a new task as recommended here:
- specifying classpath for built-in ant tasks