从蚂蚁的build.xml本地lib目录加载JSCH库 [英] Loading JSCH Library from local lib directory in ant build.xml

查看:119
本文介绍了从蚂蚁的build.xml本地lib目录加载JSCH库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能做的SCP的任务,而我jsch-0.1.44.jar添加到蚂蚁/ lib目录directory.But我想从本地lib目录加载,并把它添加到classpath.Could请你帮

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

推荐答案

内置的任务都限制了定制类路径的选择。

The built-in tasks have limited options for customizing the classpath.

1)将您的自定义罐子在$ {}的user.home /。蚂蚁/ lib目录

1) Place your custom jars in the ${user.home}/.ant/lib directory

/home/mark/.ant
└── lib
    ├── ivy.jar
    └── jsch.jar

这是我安装是我个人对标准的扩展ANT发行罐

This is where I install jars that are my personal extensions to the standard ANT distro

2)提供关于命令行的jar目录的位置

2) Supply the location of the jar directory on the commandline

ant -lib /path/to/jsh/jar

3)
你可以尝试声明一个新的任务,这里推荐:

3) You could try to declare a new task as recommended here:

  • specifying classpath for built-in ant tasks

这篇关于从蚂蚁的build.xml本地lib目录加载JSCH库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆