Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2 final
-
Fix Version/s: 2.3-M2
-
Component/s: None
-
Labels:None
-
Testcase included:yes
Description
[UPDATED - NOTE: This does NOT occur when run-war the application, only when run-war the plugin itself]
I've found why Weceem appears broken in Grails 1.2 run-war deployments.
doWithApplicationContext is not being run in WAR deployments.
I reproduced this with a standalone plugin. This seems pretty critical. Is there a workaround? Has anybody actually deployed a war with plugins that use doWithApplicationContext successfully? This can't be that straightforward as I can't see how this can be completely broken - somebody would have noticed.
I created a plugin that does nothing at all, but in the plugin groovy file has:
def doWithApplicationContext = { applicationContext ->
// TODO Implement post initialization spring config (optional)
System.out.println "in doWithApplicationContext"
throw new RuntimeException()
}
If you run-app it, it crashes and burns as you expect. If you run-war - nothing, it starts up.
If you deploy this plugin into an clean grails app and run-app, it dies. run-war, it starts up.
Was burned by this bug today during development of OpenAM plugin