|
|
|
[
Permlink
| « Hide
]
Lee Butts - 12/May/08 08:54 PM
See related/duplicate issues for suggested solutions/patches
There is a major difference between this issue and the 2 related ones: here I use a custom web.xml template.
i've changed package.groovy to add the environment, if the user needs to change this they can run install-templates
Graeme, from your comment, I think that the problem is not solved when using a custom template: I don't want to modify my template before creating a war, which means that Grails should not take the template as it but modify the webAppRootKey.
I don't think i understand the problem, to me the semantics seem perfectly clear. Grails by default generates the webAppRootKey, if you don't want it generated you run install-templates and specify your own. If you have issues with running the same app multiple times on the same machine then you can use the versioning system.
Perhaps I'm missing something. Here is my scenario:
Generally it seems to me that the web.xml template has 2 purposes that should perhaps not be handled together: modify the web.xml stuff needed by Grails and add custom web.xml stuff. I don't see how the versioning system could help here, but I'm perhaps wrong. If you want your webAppRootKey generated by Grails for you then put @grails.project.key@ as its value in your template
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>@grails.project.key@</param-value>
</context-param>
I don't see or understand what you want us to do to solve this problem any other way This would be just fine but according to the code of scripts/Package.groovy, I guess that it won't work (I haven't tested): the line
Ant.replace(file:tmpWebXml, token:"@grails.project.key@", value:"${grailsAppName}-${grailsEnv}-${grailsAppVersion}") is called only if no custom web.xml exists. A good solution for me would be to have this Ant.replace in Package.groovy for custom web.xml as well and to remove the same line in InstallTemplates.groovy to install template with the placeholder rather than with the actual value. Thanks.
I'm not concerned, but shouldn't the replacement occur as well if custom web.xml is defined by config.grails.config.base.webXml? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||