Mavenで統合テストを実行しようとしています。catalina-base を正しいディレクトリにデプロイし、Tomcat7 のローカル インストールとして設定された catelina-home で実行しています。
ただし、copy/configfile コマンドは server.xml では機能しません。tomcat-users.xml は正しくコピーされていますが、server.xml はコピーされていません。なぜこれが起こっているのでしょうか?以下の pom.xml を参照してください。
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
</deployable>
</deployables>
<container>
<containerId>tomcat7x</containerId>
<home>${catalina-home}</home>
<type>installed</type>
</container>
<configuration>
<home>${project.build.directory}/catalina-base</home>
<type>standalone</type>
<files>
<copy>
<configfile>true</configfile>
<file>server.xml</file>
<tofile>conf/server.xml</tofile>
<overwrite>true</overwrite>
</copy>
<copy>
<configfile>true</configfile>
<file>tomcat-users.xml</file>
<tofile>conf/tomcat-users.xml</tofile>
<overwrite>true</overwrite>
</copy>
</files>
</configuration>
</configuration>
<executions>
<execution>
<id>tomcat-run</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>tomcat-shutdown</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>