How do I get Ivy to copy the dependencies to the lib directory when using it from the command line?

主宰稳场 提交于 2019-12-06 00:53:14

问题


I have the following command:

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

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

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

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


回答1:


You're missing the retrieve option.

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

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



来源:https://stackoverflow.com/questions/3256273/how-do-i-get-ivy-to-copy-the-dependencies-to-the-lib-directory-when-using-it-fro

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