动态修改 ant 类路径
我想使用依赖于 ant 类路径的解析器 (ssh)。
要
<resolvers>
...
<ssh ...
...
</resolvers>
使用它,我需要在 ant 类路径中使用 jsch 。 Ant 脚本应该仅依赖于公共库(其中还包括已解析的 jsch 依赖项)- 在任何客户端 PC 上使用它。场景是:
- 下载lib的任务。
- 提取libs(jsch等)
- ivy:configure
但是ivy:configure没有任何classpathref参数,所以我不清楚如何加载我提取的jar。
是否可以?
或者,可能,以某种方式使用扩展类路径在内部再次运行 ant?
I want to use resolvers (ssh) which are dependant on ant classpath.
Something like
<resolvers>
...
<ssh ...
...
</resolvers>
To use it I need jsch in ant classpath. Ant script should depends only on common lib (which also includes resolved jsch dependencies) - to use it on any client PC. Scenario is:
- task to download lib.
- Extract libs (jsch and etc.)
- ivy:configure
But ivy:configure does not have any classpathref param, so it is unclear for me how to load jars I extracted.
Is it possible?
Or, probably, somehow run ant again internally with extended classpath?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,
所以我对问题的评论看起来对我来说很好,但最终它不起作用。
我发现的唯一方法(我的意思是工作方式)是使用
构造新的类路径并在同一构建文件上运行 exec所需目标:
Ok,
so my comment to question looked good for me but at the end it did not work.
The only way I found (working way I mean) is to to run ant script with
Construct new classpath and run exec on same build file with required target: