【发布时间】:2011-02-08 09:18:56
【问题描述】:
我在 webapp/META-INF/ 中有以下 context.xml。 tomcat 使用这个来定义 Spring 可以通过 Property 理解的值
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Parameter name="si.host" value="super.com" override="false"/>
</Context>
现在我正在尝试使用 maven jetty 插件部署 webapp:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<jettyEnvXml>${basedir}\src\test\resources\server\jetty\jetty-env.xml</jettyEnvXml>
<jettyConfig>${basedir}\src\test\resources\server\jetty\jetty.xml</jettyConfig >
<contextPath>/myapp</contextPath>
<webApp>target/myapp.war</webApp>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
如何在 jetty.xml 文件中添加此参数?
我已经深入研究了他们的文档以及此处和谷歌,但没有发现任何明确的内容。
提前感谢您的帮助。
【问题讨论】: