tomcat7-maven-plugin/tomcat7:运行自定义context.xml的位置?

gja*_*bet 7 maven maven-tomcat-plugin embedded-tomcat-7

我喜欢使用tomcat7-maven-plugin开发,特别是mvn tomcat7:run/tomcat7:run-war目标,以便快速测试我的应用程序,

这个插件允许你指定一个自定义的Context.xml(这对于为jndi数据源提供存根非常方便)

我的问题是,我想不出一个存储这个Context.xml的好地方.它根本不适合maven标准目录布局......

任何的想法 ?最佳做法?:d

谢谢,

gja*_*bet 9

好的,我还没找到合适的答案.如果有人想知道,我采取了这种方法:

<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>
Run Code Online (Sandbox Code Playgroud)


欢迎评论!