我想将ivy.default.ivy.user.dir设置为默认值 ${user.home}/.ivy2 以外的其他内容 . 我可以在命令行上执行此操作
ant -Divy.default.ivy.user.dir=${WORKSPACE}/IVYCACHE . 但是,我想在没有命令行arg的情况下设置它 . 我尝试在build.xml,my.xml和myvysettings.xml中设置此属性 . 奇怪的是,它似乎将默认缓存设置为此路径,但详细输出表明user.dir没有默认设置,因此它使用 ${user.home}/.ivy2 路径 .
这是我在build.xml文件中设置user.dir时的输出 . 奇怪的是,它将默认缓存设置为我用于user.dir的路径
[ivy:buildlist] No ivy:settings found for the default reference 'ivy.instance'. A default instance will be used
[ivy:buildlist] Loading jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivy.properties
[ivy:buildlist] searching settings file: trying /home/hudson/.hudson/jobs/Next_CI/workspace/ivysettings.xml
[ivy:buildlist] searching settings file: trying /home/hudson/.hudson/jobs/Next_CI/workspace/ivyconf.xml
[ivy:buildlist] searching settings file: trying ivysettings.xml
[ivy:buildlist] searching settings file: trying ivyconf.xml
[ivy:buildlist] no settings file found, using default...
[ivy:buildlist] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:buildlist] jakarta commons httpclient not found: using jdk url handling
[ivy:buildlist] :: loading settings :: url = jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-public.xml
[ivy:buildlist] no default cache defined: set to /home/hudson/.hudson/jobs/Next_CI/workspace/ivy2/cache
[ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-shared.xml
[ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-local.xml
[ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-main-chain.xml
[ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-default-chain.xml
[ivy:buildlist] settings loaded (71ms)
[ivy:buildlist] default cache: /home/hudson/.hudson/jobs/Next_CI/workspace/ivy2/cache
然后,它声称user.dir没有设置在任何地方 . 解决:
[ivy:resolve] Loading jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivy.properties
[ivy:resolve] jakarta commons httpclient not found: using jdk url handling
[ivy:resolve] :: loading settings :: file = /home/hudson/.hudson/jobs/Next_CI/workspace/common/ivysettings.xml
[ivy:resolve] no default ivy user dir defined: set to /home/hudson/.ivy2
这是我的build.xml行:
我尝试将此行添加到common / ivysettings.xml和common / common.xml中,但没有运气 .