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?