Maven WAR での Java クラスのフィルタリングに苦労しています。Maven は多くの Java クラスをコンパイルし、それらはすべて
target/classes
そして、私は次のようなパッケージを持っています:
a/A.class
a/b/B.class
a/b/C.class
ここまではOKです。しかし、私が必要としているのは、内部に単一の Java クラスを持つことです。
WEB-INF/classes
このように:
a/b/B.class
これは、私の pom.xml からのプラグインのセクションです。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warName>${project.artifactId}</warName>
<webXml>${basedir}/src/main/application/WEB-INF/web.xml</webXml>
<packagingExcludes>WEB-INF/lib/*.jar,a/A.class,a/b/C.class</packagingExcludes>
<webResources>
<resource>
<directory>${basedir}/src/main/application/WEB-INF</directory>
<includes>
<include>jboss-web.xml</include>
</includes>
<targetPath>WEB-INF</targetPath>
</resource>
<resource>
<directory>${basedir}/src/main/application/META-INF</directory>
<includes>
<include>standard-jaxws-endpoint-config.xml</include>
</includes>
<targetPath>META-INF</targetPath>
</resource>
</webResources>
</configuration>
</plugin>
残念ながら、すべてのクラスが WAR にパッケージ化されています。
ヒントはありますか?
よろしくお願いします、SK