groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Nelson <eric...@gmail.com>
Subject Proper way to change location of the Grapes cache directory ?
Date Tue, 19 May 2015 20:50:14 GMT
Problem...
I wanted to to move the groovy grapes cache directory
   from ~/.groovy/grapes
   to /opt/apps/.groovy/grapes
so that all user accounts would share the same jars.

Here are the steps I took. So far this seems to work.

  1) From the groovy-all jar, copy /groovy/grape/defaultGrapeConfig.xml to
/opt/apps/.groovy/grapeConfig.xml

  2) in this file change these two lines...

        <ivy
pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
        <artifact
pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>

      to these...

        <ivy
pattern="/opt/apps/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
        <artifact
pattern="/opt/apps/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>

  3) in groovy/bin/startGroovy
     add -Dgrape.root=/opt/apps/.groovy

Is this the correct way to do this?
Is there any downside to moving the grape cache?

Mime
View raw message