2011-01-21 6 views
6

を開始しません:桟橋は、事前統合に開始されるまで統合テストは、私がこの構成では、私の統合テストを実行するために、Mavenのフェイルセーフプラグインを使用しようとしている(フェイルセーフ、Mavenの)

<plugin> 
    <artifactId>maven-failsafe-plugin</artifactId> 
    <version>2.7.1</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.mortbay.jetty</groupId> 
    <artifactId>maven-jetty-plugin</artifactId> 
    <version>6.1.7</version> 
    <configuration> 

      <connectors> 
      <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> 
       <port>8080</port> 
       <maxIdleTime>3600000</maxIdleTime> 
      </connector> 
      </connectors> 

     <contextPath>/</contextPath> 
     <scanIntervalSeconds>3</scanIntervalSeconds> 
     <scanTargetPatterns> 
      <scanTargetPattern> 
       <directory>src/main/webapp/WEB-INF</directory> 
       <excludes> 
        <exclude>**/*.jsp</exclude> 
        <exclude>**/*.html</exclude> 
       </excludes> 
       <includes> 
        <include>**/*.page</include> 
        <include>**/*.properties</include> 
        <include>**/*.xml</include> 
       </includes> 
      </scanTargetPattern> 
     </scanTargetPatterns> 
    </configuration> 
    <executions> 
      <execution> 
       <id>start-jetty</id> 
       <phase>pre-integration-test</phase> 
       <goals> 
        <goal>run-war</goal> 
       </goals> 
       <configuration> 
        <scanIntervalSeconds>0</scanIntervalSeconds> 
        <daemon>true</daemon> 
       </configuration> 
      </execution> 
      <execution> 
       <id>stop-jetty</id> 
       <phase>post-integration-test</phase> 
       <goals> 
        <goal>stop</goal> 
       </goals> 
      </execution> 
    </executions> 
</plugin> 

すべてが大丈夫ですテスト段階。まるで何かを待っているかのように何も起こらない。最後の行は言う:

[INFO] Started Jetty Server

私はテストが右その後起動することができますどのように?私はmvn verifyを使用してmavenを実行します。

+0

バージョン8.1.9で同じ問題が発生しています。 –

+0

と同じ9.4.4.v20170414 – xedo

答えて

2

6.1.7から6.1.26までのjetty mavenプラグインバージョンの変更はすべてを解決しました。まだ解決策を探している人のために

+0

私は同じ問題に直面していました。バージョンを6.1.26にアップグレードしましたが、統合テストは実行されていません。最後の行は次のとおりです:[INFO] Jetty Serverを開始しました。その後、何も起こりません。 Mavenのクリーンインストールのステップはそれを止めます。それがなぜ起こっているのか? –

+0

バージョン9.4.4.v20170414と同じ問題があります。 @ジェイZusのソリューションは正しいです – xedo

2

、私は同じ問題と、私はスタートながら、ラン*は、実行をブロックしているので、それが動作する

<goals> 
    <goal>start</goal> 
</goals> 

によって

<goals> 
    <goal>run-war</goal> 
</goals> 

を交換することによってそれを解決することを持っていましたノンブロッキングです。

+0

これは正しい解決策です – xedo

関連する問題