多くのサブプロジェクトを含むアプリケーションがあります。現在、maven2を使用してコンパイルしてEARにパッケージ化し、それをJBOSS4.2.3にデプロイしています。
これまではすべてのjarがEARルートにあるだけでしたが、JBOSS 7.1に移行し、1つのjarが他のjarによって認識されるようにするには(Commonsプロジェクトで他のすべてのプロジェクトで使用できるようにする必要があります)、その下に配置する必要があります。 EAR / lib(これはJBOSS 7.1の要件です)。
私の質問は、特定のjarをEAR /libにコピーするようにMavenに指示するにはどうすればよいですか?
/ *アップデート** /
これが私がEARを構築するために使用するものです:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<outputDirectory>../../outputs/java</outputDirectory>
<version>5</version>
<modules>
<jarModule>
<groupId>com.example.common</groupId>
<artifactId>common</artifactId>
<includeInApplicationXml>
true
</includeInApplicationXml>
</jarModule>
.....
</modules>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>ear</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<sourceDirectory>EarContent</sourceDirectory>
<resources>
<resource>
<directory>EarContent\META-INF</directory>
<targetPath>../Manager-1.0/META-INF</targetPath>
<excludes>
<exclude>application.xml</exclude>
</excludes>
</resource>
</resources>
</build>