2012-03-18 26 views
8

發行戲DEPS當我部署在服務器上的應用程序發揮在我在〜/ 沒有寫權限 我收到以下錯誤發揮框架1.x的 - 如何改變常春藤緩存位置

[playdemo-playdemo.rhcloud.com repo]\> ~/playdemo/data/play-1.2.4/play deps 
~  _   _ 
~ _ __ | | __ _ _ _| | 
~ | '_ \| |/ _' | || |_| 
~ | __/|_|\____|\__ (_) 
~ |_|   |__/ 
~ 
~ play! 1.2.4, http://www.playframework.org 
~ 
~ Resolving dependencies using  /var/lib/libra/eadfb84dc0ac4b05baa584693f557e5e/playdemo/runtime/repo/conf/dependencies.yml, 
~ 
Exception in thread "main" java.io.FileNotFoundException:  /var/lib/libra/eadfb84dc0ac4b05baa584693f557e5e/.ivy2/cache/resolved-play-application-repo-1.0.xml (No such file or directory) 
    at java.io.FileOutputStream.open(Native Method) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:209) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:160) 
    at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorWriter.write(XmlModuleDescriptorWriter.java:69) 
    at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorWriter.write(XmlModuleDescriptorWriter.java:61) 
    at org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor.toIvyFile(DefaultModuleDescriptor.java:549) 
    at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:248) 
    at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:195) 
    at play.deps.DependenciesManager.resolve(DependenciesManager.java:327) 
    at play.deps.DependenciesManager.main(DependenciesManager.java:39) 

我試圖幾件事情來改變緩存目錄,像 具有以下內容

<ivysettings> 
    <caches defaultCacheDir="/tmp/ivy"/> 
</ivysettings> 

傳遞-D-緩存創建在app.conf一個ivysettings.xml =/TMP /常春藤

設置JAVA_OPTS環境變量

export JAVA_OPTS="$JAVA_OPTS -Divy.default.ivy.user.dir=/tmp/ivy" 

將它作爲一個參數

play deps -Divy.default.ivy.user.dir=/tmp/ivy 

但似乎沒有任何工作...

任何想法,我能怎麼辦呢???

saludos

SAS

-

編輯

PS:發現此相關的問題:How to override the location of Ivy's Cache?

回答

12

和谷歌上搜索了幾個小時後嘗試不同的選擇,我身邊ve finnaly找到了答案

只是要

play deps -Divy.home=/tmp/ivy2/ 

我希望它可能是別人

有用