I'd like to include some Maven properties(*) in src/main/webapp/META-INF/context.xml
.
(*) E.g. ${data-source-name}
, ${data-source-factory}
, ${jdbc-connection-url}
etc. - but in the words of the late, great Leslie Nielsen, that's not important right now.
Thought this might be achievable using something like the following maven-resource-plugin config:
<build>
<resources>
<resource>
<directory>src/main/webapp</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>
But this results in two versions of context.xml in the WAR file:
\META-INF\context.xml <=== Properties *not* expanded
\WEB-INF\classes\META-INF\context.xml <=== Properties expanded
Where am I going wrong?