いくつかの戦争を展開するために、jetty maven プラグインを使用しています。ポート 8180 の moduleA.war ポート 8380 の moduleB.war の 2 つのモジュールがあります。
maven jetty プラグインを使用して war を展開すると、両方のアプリケーションのコネクタを設定しているにもかかわらず、両方の webapps がポート 8180 で実行しようとしています。これを行うための私のpom構成は次のとおりです。
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.1.3.v20100526</version>
<configuration>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8180</port>
<name>instance_8180</name>
</connector>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8380</port>
<name>instance_8380</name>
</connector>
</connectors>
<contextHandlers>
<!-- <contextHandler implementation="org.mortbay.jetty.plugin.JettyWebAppContext"> -->
<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
<war>/${project.build.directory}/user-mgmt-web-1.0-SNAPSHOT.war</war>
<contextPath>/user-mgmt-web</contextPath>
<connectorNames>
<item>instance_8180</item>
</connectorNames>
</contextHandler>
<!-- <contextHandler implementation="org.mortbay.jetty.plugin.JettyWebAppContext"> -->
<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
<war>/${project.build.directory}/services-web-1.0-SNAPSHOT.war</war>
<contextPath>/services-web</contextPath>
<connectorNames>
<item>instance_8380</item>
</connectorNames>
</contextHandler>
</contextHandlers>
<stopPort>80</stopPort>
<stopKey>stop</stopKey>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>stop</goal>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
デプロイされた 2 番目の webapp を割り当てられたポートで開始する方法を知りたいです。それを実行すると、コンテナーが 2 番目の webapp の初期化を完了すると、アドレスが既に使用されているというエラーが表示されます。
あさね