【发布时间】:2018-02-10 12:44:12
【问题描述】:
我正在尝试为本地开发部署一个war 文件,并且我想修改tomcat 的context.xml 以通过jndi 提供数据源。这在使用 tomcat7-maven-plugin 时有效:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<contextFile>../../tomcat-test-context.xml</contextFile>
</configuration>
</plugin>
问题是,tomcat7-maven-plugin 不适用于我在项目中使用的覆盖,所以我必须使用另一种方法。我可以在 intellij idea 中部署战争工件,但我没有看到任何选项来指定 contextFile ,就像在 tomcat7-maven-plugin 中一样。在 intellij idea tomcat 配置中是否有一些选项可以做类似的事情?
当然我可以修改catalina home下的context.xml,但是我希望每个项目都配置它,不想有很多tomcat。
该应用程序在生产中部署在 weblogic 上,我仅在本地使用 tomcat 进行测试。
【问题讨论】:
标签: intellij-idea tomcat7