Tomcat の server.xml を差し替える必要があって調べてたんですが、中々見つからなかったので書いときます。
※本家と思われるサイト(Cargo - Maven2 plugin)では見つけられなかったので、自己責任で。。
Cargo プラグインでセットアップすると、server.xml 等のファイルが、Cargo プラグインのデフォルトのファイル?になるみたいです。
なので、差し替えたい場合は、下のような書き方で動きました。ちなみに Maven2 のバージョンは、2.2.1 です。
<plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.0</version> <executions> <execution> <id>start-container</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> <goal>deploy</goal> </goals> </execution> <execution> <id>stop-container</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> <configuration> <container> <containerId>tomcat6x</containerId> <zipUrlInstaller> <url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.24/bin/apache-tomcat-6.0.24.zip</url> <installDir>${java.io.tmpdir}/cargoinstalldir</installDir> </zipUrlInstaller> </container> <configuration> <type>standalone</type> <configfiles> <configfile> <file>src/config/server.xml</file> <tofile>conf/server.xml</tofile> </configfile> </configfiles> </configuration> <wait>false</wait> </configuration> </plugin>
この configfiles ってタグが差し替えを指定している箇所です。
Custom File Configurations - Cargo - Codehaus も試したんですがうまく動かず。。*1
ちなみに configfiles ってタグは、 を見つけて試したところ動きました。