|
This question may make me look really stupid
(and maybe I am) but is there any actual requirement for setting GROOVY_HOME
or is it more of a best practices/convenience thing?
I ask because we are currently straddling versions. We are upgrading Grails, so for a time we have two different versions of Grails. We also have some Groovy (non-Grails) projects that we are trying to upgrade in loose connection with our Grails projects to keep our Groovy development at the same level. So what does GROOVY_HOME actually control? Is it important to have it set a certain way for something(s) to resolve correctly? JAVA_HOME is definitely important since both Groovy and Grails are going to look to it for the JDK. Does GROOVY_HOME have a similar effect somewhere? We use GROOVY_HOME in the build scripts for our Groovy projects, but that is for convenience. We could just as easily use MY_GROOVY or something else. The bin directory that is in my PATH seems like the real determiner for any Groovy commands. And I believe that Grails uses the version of Groovy that is embedded in it regardless of GROOVY_HOME. It is probably not the right place to ask but I have a similar question regarding GRAILS_HOME. Since I have (thankfully only) two versions of both to deal with it has become a real concern as to just what I am doing when I set G*_HOME. Thanks for any assistance. -Andy |
|
GROOVY_HOME is read by all the startup scripts like "groovy", "groovyc", "groovyConsole", and "groovysh".
You can open startGroovy or startGroovy.bat in the distribution and see the usage. As far as I know, GROOVY_HOME is not read by code, it is used by these applications. IE, the Groovy codebase never calls System.getProperty('GROOVY_HOME'). -- Hamlet D'Arcy [hidden email] ----- Original Message ----- > This question may make me look really stupid (and maybe I am) but is > there any actual requirement for setting GROOVY_HOME or is it more of > a best practices/convenience thing? > > I ask because we are currently straddling versions. We are upgrading > Grails, so for a time we have two different versions of Grails. We > also have some Groovy (non-Grails) projects that we are trying to > upgrade in loose connection with our Grails projects to keep our > Groovy development at the same level. So what does GROOVY_HOME > actually control? Is it important to have it set a certain way for > something(s) to resolve correctly? JAVA_HOME is definitely important > since both Groovy and Grails are going to look to it for the JDK. Does > GROOVY_HOME have a similar effect somewhere? > > We use GROOVY_HOME in the build scripts for our Groovy projects, but > that is for convenience. We could just as easily use MY_GROOVY or > something else. The bin directory that is in my PATH seems like the > real determiner for any Groovy commands. And I believe that Grails > uses the version of Groovy that is embedded in it regardless of > GROOVY_HOME. > > It is probably not the right place to ask but I have a similar > question regarding GRAILS_HOME. Since I have (thankfully only) two > versions of both to deal with it has become a real concern as to just > what I am doing when I set G*_HOME. > > Thanks for any assistance. > > -Andy --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Am 27.01.2011 07:09, schrieb Hamlet DArcy:
> GROOVY_HOME is read by all the startup scripts like "groovy", > "groovyc", "groovyConsole", and "groovysh". > > You can open startGroovy or startGroovy.bat in the distribution and > see the usage. > > As far as I know, GROOVY_HOME is not read by code, it is used by > these applications. IE, the Groovy codebase never calls > System.getProperty('GROOVY_HOME'). I think the rootloader configuration part does read it. You find there for example: # load required libraries load !{groovy.home}/lib/*.jar but GROOVY_HOME is set by the startup script (startGroovy) if it was not set to something the script assumes is correct. I in general have it not set for example, and I have a dozend versions of Groovy on my computer bye blackdrag -- Jochen "blackdrag" Theodorou The Groovy Project Tech Lead http://blackdragsview.blogspot.com/ For Groovy programming sources visit http://groovy.codehaus.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Jochen Theodorou wrote on 01/27/2011 03:42:18 AM:
> Am 27.01.2011 07:09, schrieb Hamlet DArcy: > > GROOVY_HOME is read by all the startup scripts like "groovy", > > "groovyc", "groovyConsole", and "groovysh". > > > > You can open startGroovy or startGroovy.bat in the distribution and > > see the usage. > > > > As far as I know, GROOVY_HOME is not read by code, it is used by > > these applications. IE, the Groovy codebase never calls > > System.getProperty('GROOVY_HOME'). > > I think the rootloader configuration part does read it. You find there > for example: > > # load required libraries > load !{groovy.home}/lib/*.jar > > but GROOVY_HOME is set by the startup script (startGroovy) if it was not > set to something the script assumes is correct. I in general have it not > set for example, and I have a dozend versions of Groovy on my computer Thanks for the useful information! Based on this it sounds like GROOVY_HOME is more of an inconvenience. It is best to leave it unset and let startGroovy do the right thing. If you set GROOVY_HOME to some version and then run with another version you are going to end up with an exception at best. I would even go so far as to say my builds should find Groovy through something else (like a BUILD_GROOVY variable) so that I never have to set GROOVY_HOME at all! -Andy |
|
Am 27.01.2011 15:21, schrieb Andy Goodspeed:
[..] > Based on this it sounds like GROOVY_HOME is more of an inconvenience. It > is best to leave it unset and let startGroovy do the right thing. If you > set GROOVY_HOME to some version and then run with another version you > are going to end up with an exception at best. > > I would even go so far as to say my builds should find Groovy through > something else (like a BUILD_GROOVY variable) so that I never have to > set GROOVY_HOME at all! GROOVY_HOME is to be set if for some strange reason the automatic lookup does not work. It's not there to cause problems to people ;) bye blackdrag -- Jochen "blackdrag" Theodorou The Groovy Project Tech Lead http://blackdragsview.blogspot.com/ For Groovy programming sources visit http://groovy.codehaus.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Jochen Theodorou wrote on 01/27/2011 09:25:22 AM:
> GROOVY_HOME is to be set if for some strange reason the automatic lookup > does not work. You'd never know that from the Getting Started entry on the web or any other documentation I have ever seen. They all say: 1. Install 2. Set GROOVY_HOME 3. Set PATH And actually #3 is the one that is noted to be optional. Thanks again for the insight! -Andy |
|
Am 27.01.2011 15:59, schrieb Andy Goodspeed:
> Jochen Theodorou wrote on 01/27/2011 09:25:22 AM: > > GROOVY_HOME is to be set if for some strange reason the automatic lookup > > does not work. > > You'd never know that from the Getting Started entry on the web or any > other documentation I have ever seen. They all say: > > 1. Install > 2. Set GROOVY_HOME > 3. Set PATH > > And actually #3 is the one that is noted to be optional. ah, ok, I changed the page now ;) bye blackdrag -- Jochen "blackdrag" Theodorou The Groovy Project Tech Lead http://blackdragsview.blogspot.com/ For Groovy programming sources visit http://groovy.codehaus.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | See how NAML generates this page |
