Loading JSCH Library from local lib directory in ant build.xml

为君一笑 提交于 2019-12-18 09:38:23

问题


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


来源:https://stackoverflow.com/questions/13468153/loading-jsch-library-from-local-lib-directory-in-ant-build-xml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!