从命令行使用时,如何让 Ivy 将依赖项复制到 lib 目录? [英] How do I get Ivy to copy the dependencies to the lib directory when using it from the command line?

查看:29
本文介绍了从命令行使用时,如何让 Ivy 将依赖项复制到 lib 目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下命令:

java -jar ...\ivy-2.2.0-rc1.jar -ivy ...\ivy.xml

我希望解决依赖项并将它们复制到我的项目的 lib 文件夹中.

Which I am expecting to resolve the dependencies and copy them to the lib folder of my project.

Ivy 似乎解决了依赖关系,但没有进行复制.如果我运行 ant 任务,复制会正确发生.

Ivy seems to resolve the dependencies but does not do the copy. If I run the ant task the copy happens correctly.

有谁知道为什么我的命令行调用没有发生到 lib 的复制?

Does anyone know why the copy to lib does not happen with my command line call?

推荐答案

您缺少检索选项.

java -jar $IVYJAR \ 
     -settings ivysettings.xml \
     -ivy ivy.xml \
     -retrieve "lib/[artifact].[ext]"

您指定如何从缓存中检索工件的模式

You specify a pattern for how the artifact will be retrieved from the cache

默认情况下,独立的 ivy 程序只会解析依赖项(换句话说,只有下载和缓存)

By default the standalone ivy program will only resolve a dependency (In other words, only download and cache)

这篇关于从命令行使用时,如何让 Ivy 将依赖项复制到 lib 目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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