Tomcat に手動でデプロイすると、Web アプリケーションが正常に動作します。ビルド中に統合テストを実行したいのですが、tomcat7-maven-plugin を使用して、webapp がデプロイされる組み込みの tomcat を開始したいと考えています。
での構成pom.xml
:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<path>/${name}</path>
</configuration>
<executions>
<execution>
<id>start-tomcat</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>stop-tomcat</id>
<phase>post-integration-test</phase>
<goals>
<goal>shutdown</goal>
</goals>
</execution>
</executions>
</plugin>
Tomcat は起動していますが、エラーが表示されます。
org.springframework.beans.factory.BeanInitializationException:
Could not load properties; nested exception is java.io.FileNotFoundException:
Could not open ServletContext resource [/WEB-INF/conf/configuration.properties]
/WEB-INF/conf/configuration.properties
war ファイルに存在します。war がスタンドアロンの Tomcat インスタンスにデプロイされている場合、アプリケーションは正しく動作します。
Spring が戦争に存在する構成ファイルを見つけられない原因となる考えはありますか?