Setting ivy home directory in Ant

你离开我真会死。 提交于 2019-12-04 05:12:57

I added the exact line that you have specified in the sample build.xml provided in the ivy binary download and could see the artifacts downloaded in ivy2 subfolder within the samples folder.

...
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<property name="ivy.default.ivy.user.dir" value="${basedir}/ivy2" />
...

I am using ivy 2.2 and ant 1.8.2. Can you check if the same works for you?

[Edit]: From the docs,

Actually all ant properties are imported into ivy variables when the configuration is done (if you call ivy from ant). This means that if you define an ant property after the call to configure, it will not be available as an ivy variable.

The environment variable ANT_OPTS allows to set jvm parameters. So you may put to your ANT_OPTS the same command line argument you invoke 'ant' shell script with. E.g. under m$ windoozer:

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