2016-04-22 11 views
1

検索の2日後、まだテスト前にtomcatを実行できません。ここに私のポンポンテストを開始する前にtomcatを実行するには

<plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-failsafe-plugin</artifactId> 
    <version>2.16</version> 
    <executions> 
    <execution> 
     <id>integration-test</id> 
     <goals> 
      <goal>integration-test</goal> 
     </goals> 
    </execution> 
    <execution> 
     <id>verify</id> 
     <goals> 
      <goal>verify</goal> 
     </goals> 
    </execution> 
    </executions> 
</plugin> 

<plugin> 
<groupId>org.apache.tomcat.maven</groupId> 
<artifactId>tomcat7-maven-plugin</artifactId> 
<version>2.2</version> 
<configuration> 
    <server>tomcat-development-server</server> 
    <port>8081</port> 
    <path>/test</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> 

私はMVNを使用私のテストが開始検証

ですが、サーバーは、私は私が欠けているのか分からないではありません!

答えて

0

iが事前統合テスト・フェーズ

<configuration> 
     <fork>true</fork> 
</configuration> 
でこのコードを追加することにより問題を解決し
関連する問題