我想將ivy.default.ivy.user.dir設置爲除默認值${user.home}/.ivy2
以外的值。我可以在命令行上使用設置Ant中的ivy主目錄
ant -Divy.default.ivy.user.dir=${WORKSPACE}/IVYCACHE
。但是,我想讓它在沒有命令行參數的情況下設置。我已經嘗試在我的build.xml,common.xml和我的ivysettings.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行:
<property name="ivy.default.ivy.user.dir" value="${basedir}/ivy2" />
我曾嘗試加入這行來共同/ ivysettings.xml和普通/ common.xml沒有運氣。
我想這個問題現在回答了?你已經問了兩次....查看http://stackoverflow.com/questions/5019550/can-i-turn-off-the-ivy-cache-all-together/5023172#5023172 – 2011-02-16 23:25:14