プロジェクトの2つの異なるバージョンを自動的に作成しようとしています。プロファイルなしの複数のsrc/main/resourcesフォルダ
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
<configuration>
<resources>
<resource>
<directory>src/main/resources/first</directory>
</resource>
</resources>
<webappDirectory>${webappDirectory}</webappDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>war</goal>
</goals>
</execution>
</executions>
<configuration>
<resources>
<resource>
<directory>src/main/resources/second</directory>
</resource>
</resources>
<webappDirectory>${project.build.directory}/deployment</webappDirectory>
</configuration>
</plugin>
を次のように私が行っていることは、私は二つの異なるプラグインの実行を追加しているされてこれは、両方のwebappDirectoriesを構築し、期待どおりには、WARファイルを作成しますが、リソースが正しく含まれていません(無視しているようです上記のリソース定義)。
私は間違ったフェーズでこれをやっていると思いますが、どの段階でデフォルトのリソースディレクトリを上書きする必要がありますか?
(私は両方が一度に行われているにしたい、二つの異なるプロファイルを持ってしたくない、何卒ご了承下さい)
私はむしろ 'package'フェーズを使います。しかし、リソースは 'compile'の前に処理されるので、なぜ正しく埋め込まれていないのかわかりません。 –