I am building a webapp through Gradle's war plugin. In order to disable Tomcat's session persistence, I need to place the file context.xml
in the META-INF
directory of the war's root.
I attempted the following:
- Create the file
src/main/webapp/META-INF/context.xml
of the main project - Create the file
src/main/resources/META-INF/context.xml
of the main project
However, when I build the project using gradle clean war
, the produced war file contains a META-INF
with only a MANIFEST.MF
in it. It is as if my directory gets overridden.
How do I place context.xml
in the war?