Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3.5
-
Component/s: Project infrastructure
-
Labels:None
-
Environment:Ubuntu 10.10, Grails 1.3.5
Description
We have created a way of managing our 15+ environments using different configuration files stored under a directory called ./environment
The default configuration file ./grails-app/conf/Config.groovy pulls in these files as follows:
{{
environments {
development
{ loader.load(testCommon, 'test/Development') }perftest
{ loader.load(testCommon, 'test/PerfTest') }selenium
{ loader.load(testCommon, 'test/Selenium') } ...
}
}}
Where loader is an instance of our own class EnvironmentConfigLoader which we import at the top of the Config.groovy file.
If a fresh checkout of the project is done, hence the ~/.grails/projects/1.3.5/myprojectname is newly created, running 'grails run-war' or 'grails compile' does not work, with the following exception:
{{
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
script12906073437641435994217.groovy: 4: unable to resolve class xxx.yyy.EnvironmentConfigLoader
@ line 4, column 1.
import xxx.yyy.EnvironmentConfigLoader
^
}}
We believe this is because the /.grails/projects/1.3.5/myprojectname/classes directory has not yet been created, and this is indeed the case after the first grails compile or grails run-war call - the directory does not exist, since the compilation of the files in /.grails/projects/1.3.5/myprojectname/scriptCache could not complete.
It seems logical that the files in the application's classpath (i.e. ./src/*) should be compiled first, meaning that scripts, config etc. can then use classes on the application's classpath.
We have noticed that the same issue exists for plugins, whereby our './scripts/Events.groovy' script cannot import classes provided by plugins UNTIL at least one run-app has been done.
-
Hide
- grails6970-bug-report-24112010.zip
- 24/Nov/10 10:59 AM
- 69 kB
- Antony Jones
-
- grails-app/conf/BootStrap.groovy 0.2 kB
- grails-app/conf/BuildConfig.groovy 1 kB
- grails-app/conf/Config.groovy 4 kB
- grails-app/conf/DataSource.groovy 0.8 kB
- grails-app/conf/UrlMappings.groovy 0.2 kB
- grails-app/conf/spring/resources.groovy 0.0 kB
- grails-app/i18n/messages.properties 3 kB
- grails-app/i18n/messages_da.properties 3 kB
- grails-app/i18n/messages_de.properties 4 kB
- grails-app/i18n/messages_es.properties 3 kB
- grails-app/i18n/messages_fr.properties 2 kB
- grails-app/i18n/messages_it.properties 2 kB
- grails-app/i18n/messages_ja.properties 2 kB
- grails-app/i18n/messages_nl.properties 3 kB
- grails-app/.../messages_pt_BR.properties 3 kB
- grails-app/.../messages_pt_PT.properties 3 kB
- grails-app/i18n/messages_ru.properties 4 kB
- grails-app/i18n/messages_th.properties 5 kB
- grails-app/.../messages_zh_CN.properties 2 kB
- grails-app/utils/.../Thing.groovy 0.1 kB
- grails-app/views/error.gsp 2 kB
- grails-app/views/index.gsp 4 kB
- grails-app/views/layouts/main.gsp 0.7 kB
- test/jsunit/app/css/jsUnitStyle.css 2 kB
- test/jsunit/app/emptyPage.html 0.3 kB
- test/jsunit/app/jsUnitCore.js 30 kB
- test/jsunit/app/jsUnitTestManager.js 26 kB
- test/jsunit/app/jsUnitTracer.js 4 kB
- test/jsunit/app/main-counts-errors.html 0.3 kB
- test/jsunit/.../main-counts-failures.html 0.4 kB
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits