2

マルチモジュールのmavenプロジェクトに取り組んでいます。dropwizard を使用し、受け入れテストを実行するために maven-antrun-plugin を使用してアプリケーションを起動しますが、問題は、テストが終了してもアプリケーションが停止せず、タスク マネージャーからプロセスを強制終了する必要があることです。私はたくさんグーグルで検索しましたが、結果はありませんでした。Maven(Jenkins用)からそれを行う方法はありますか?

ストップゴールで試しましたが、うまくいきません:

<execution>
   <id>stop-container</id>
   <phase>post-integration-test</phase>
   <goals>
      <goal>stop</goal>
   </goals>
</execution>
4

1 に答える 1

0

Maven ソリューションが見つからなかったので、ウィザードをドロップしてシャットダウンするタスクを追加し、受け入れモジュールで実装されたクラスを使用してタスクに http 投稿を行いました。

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.3.2</version>
  <executions>
    <execution>
      <id>stop-container</id>
      <phase>post-integration-test</phase>
      <goals>
        <goal>java</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <mainClass>your.main.class</mainClass>
  </configuration>
</plugin>
于 2014-08-22T09:37:52.760 に答える