gpt4 book ai didi

playframework - play framework 1.x - 如何更改ivy缓存位置

转载 作者:行者123 更新时间:2023-12-04 06:24:24 25 4
gpt4 key购买 nike

我正在服务器中部署一个 Play 应用程序,我没有写
权限在 ~/
发出 play deps 时出现以下错误

    [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)

我尝试了几件事来更改缓存目录,例如
使用以下内容在 app.conf 中创建一个 ivysettings.xml
<ivysettings> 
<caches defaultCacheDir="/tmp/ivy"/>
</ivysettings>

传递 -D-cache=/tmp/ivy

设置 JAVA_OPTS 环境变量
export JAVA_OPTS="$JAVA_OPTS -Divy.default.ivy.user.dir=/tmp/ivy" 

将其作为参数传递
play deps -Divy.default.ivy.user.dir=/tmp/ivy 

但似乎没有任何效果......

知道我能做什么吗???

问候语

SAS

——

编辑

ps:发现这个相关问题: How to override the location of Ivy's Cache?

最佳答案

谷歌搜索,经过几个小时的尝试不同的选择,我终于找到了答案
刚好

play deps -Divy.home=/tmp/ivy2/
我希望它可能对其他人有用

关于playframework - play framework 1.x - 如何更改ivy缓存位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9756790/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com