play framework 1.x - how to change ivy cache location
Asked Answered
C

1

8

I'm deploying a play app in server in which I have no write permissions at ~/ when issuing play deps I get the following error

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

I tried several things to change the cache dir, like creating an ivysettings.xml in app.conf with the following contents

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

passing a -D-cache=/tmp/ivy

setting a JAVA_OPTS environment variable

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

passing it as a parameter

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

but nothing seems to work...

any idea what could I do???

saludos

sas

--

edit

ps: found this related question: How to override the location of Ivy's Cache?

Cordierite answered 18/3, 2012 at 7:40 Comment(0)
C
13

googling around and after several hours of trying different alternatives, I've finnaly found the answer

just had to

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

I hope it might be useful for someone else

Cordierite answered 18/3, 2012 at 20:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.