我喜欢使用 tomcat7-maven-plugin 进行开发,尤其是 mvn tomcat7:run/tomcat7:run-war 目标,以便快速测试我的应用程序,
这个插件允许你指定一个自定义的 Context.xml(为 jndi 数据源提供 stub 非常方便)
我的问题是,我想不出一个好地方来存储这个 Context.xml。它根本不适合 Maven 标准目录布局......
任何的想法 ?最佳实践? :D
谢谢,
最佳答案
好吧,我还没有找到正确的答案。如果有人想知道,我采用了这种方法:
<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>
欢迎评论!
关于maven - tomcat7-maven-plugin/tomcat7 :run where to store custom context. xml?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24272588/