2

我正在尝试在码头上部署两场战争,第一场已部署,但第二场未部署。这是我的插件配置:

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.maven.plugin.version}</version>
<configuration>
    <stopKey>stop</stopKey>
    <stopPort>9999</stopPort>
    <war>${project.build.directory}/integration-test/webapp-fast.war</war>
    <webApp>
        <contextPath>/webapp-fast</contextPath>
    </webApp>
    <contextHandlers>  
        <contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
          <war>${project.build.directory}/integration-test/stubs.war</war>
          <contextPath>/stubs</contextPath>
        </contextHandler>
            </contextHandlers>  
</configuration>
<executions>
    <execution>
        <id>start-jetty</id>
        <phase>pre-integration-test</phase>
        <goals>
            <goal>deploy-war</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>

我究竟做错了什么?

4

1 回答 1

0

尝试使用 contextHandlers 部署两个战争:

<contextHandlers>  
    <contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
      <war>${project.build.directory}/integration-test/stubs.war</war>
      <contextPath>/stubs</contextPath>
    </contextHandler>
    <contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
      <war>${project.build.directory}/integration-test/webapp-fast.war</war>
      <contextPath>/webapp-fast</contextPath>
    </contextHandler>
</contextHandlers>
于 2012-12-20T14:24:55.337 回答