Maven EAR プラグインを使用して、2 つの .war ファイルを .ear ファイルにパッケージ化したいと考えています。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>package-mae</id>
<phase>package</phase>
<configuration>
<version>6</version>
<modules>
<webModule>
<groupId>de.ast</groupId>
<artifactId>mae-mobile</artifactId>
<contextRoot>/mobile</contextRoot>
<bundleFileName>/mae-mobile.war</bundleFileName>
</webModule>
<webModule>
<groupId>de.ast</groupId>
<artifactId>mae-rest</artifactId>
<contextRoot>/api</contextRoot>
<bundleFileName>/mae-rest.war</bundleFileName>
</webModule>
</modules>
</configuration>
<goals>
<goal>generate-application-xml</goal>
<goal>ear</goal>
</goals>
</execution>
</executions>
</plugin>
war ファイルがそれぞれ 2 回ずつパッケージ化されているという事実を除けば、これはうまく機能します。つまり、ear ファイルには以下が含まれます。
- mae-rest.war
- mae-rest-0.0.1-SNAPSHOT.war
- mae-mobile.war
- mae-mobile-0.0.1-SNAPSHOT.war
この重複を避けるにはどうすればよいですか?
ありがとう、ロナルド