当我在tomcat7-maven-plugin的帮助下运行嵌入式tomcat时,它崩溃时有以下错误:
SEVERE: Missing context.xml我在maven插件中有以下配置:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<path>/project_name_test</path>
</configuration>
<executions>
<execution>
<id>tomcat-run</id>
<goals>
<goal>run-war-only</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<fork>true</fork>
</configuration>
</execution>
<execution>
<id>tomcat-shutdown</id>
<goals>
<goal>shutdown</goal>
</goals>
<phase>post-integration-test</phase>
</execution>
</executions>
</plugin>我们有默认上下文的选项吗?我不想创建任何上下文-我有war文件将上传到这个应用服务器。
编辑:
我发现了问题。为了实现ingore context.xml,您应该添加带有所需参数的属性。例如:
<configuration>
<url>http://localhost:8080/manager</url>
<server>localhost</server>
<path>/${project.build.finalName}</path>
</configuration>发布于 2014-12-11 19:37:57
你能先试试这个吗?
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>如果您需要一个context.xml文件,它应该放在META文件夹下。
https://stackoverflow.com/questions/27430577
复制相似问题