私は統合前と統合後のフェーズをmavenと連携させようとしていますが、役に立ちません。私の目標は、必要なバイナリをいくつか実行して、統合テストをセットアップおよび破棄することです。antrun-plugin
とでテストしてexec-plugin
いますが、どれもメッセージを出力しません。
私は走っていmvn verify
ます。プラグインをclean
フェーズにバインドして実行するmvn clean
と、エコー メッセージとls
が表示されます。
どうしたの?私はmaven3を使用しています
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12.3</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.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>ls</executable>
<arguments>
<argument>-la</argument>
</arguments>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>xxx</id>
<configuration>
<target>
<echo>Cleaning deployed website</echo>
</target>
</configuration>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>