Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.1
-
Fix Version/s: 1.0.2
-
Component/s: ContinuousBuild
-
Labels:None
-
Environment:Grails 1.0.1 on windows
Description
Hi,
I have a custom script created via grails create-script
At the top of my file I include the following:
includeTargets << new File ( "${grailsHome}/scripts/Init.groovy" )
includeTargets << new File ( "${grailsHome}/scripts/War.groovy" )
Within my script I call war(). The war file that is generated still contains the development path to the log4jproperties in the web.xml which dies when the app is deployed to a container. If I do a "grails war" everything works fine.
I believe this is related to the file below which checks for "war" or "run-war" as the script name in order to alter the log4j param. When I run "my-script" since it does not contain "war" or "run-war" but merely calls the "war()" target, this code does not execute.
The temporary fix hack is to rename my script to contain the word "war" in it.
Follow up, I mis-read the code. Renaming the calling custom script to simply include the word "war" does not fix this. The code that controls the replacement looks explicitly for "war" or "run-war".
The hack fix is to set System.setProperty('current.gant.script',"war") at the top of my custom script