Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tomcat7-maven-plugin / tomcat7:run where to store custom context.xml?

I like to develop using the tomcat7-maven-plugin, especially the mvn tomcat7:run / tomcat7:run-war goal in order to quickly test my app,

this plugin allows you to specify a custom Context.xml (which is very handy to provide stub for jndi datasources)

my issue is, I can not think of a good place to store this Context.xml. it simply does not fit well in the maven standard directory layout...

any idea ? best practices ? :D

thx,

like image 337
gjambet Avatar asked Jun 17 '14 20:06

gjambet


1 Answers

OK, I have not found a proper answer. In case someone wonders, I took this approach:

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <configuration>
        <contextFile>${project.basedir}\src\tomcat7-maven-plugin\resources\context.xml</contextFile>
    </configuration>
</plugin>


Comments are welcome!

like image 135
gjambet Avatar answered Oct 12 '22 18:10

gjambet