इस प्रकार मैंने निष्पादन और असफलता प्लगइन को कॉन्फ़िगर किया। मैं Sureffe का उपयोग कर रहा हूं, निश्चित रूप से सुनिश्चित करने के बजाय, निश्चित रूप से परीक्षण चरण में होने के लिए निश्चित परीक्षण अभी भी अन्य परीक्षण चला रहा है। यह पूर्व-एकीकरण चरण में चरण 1 और 2 चलाएगा (उसी चरण के लिए सूचीबद्ध कई निष्पादन दिए गए क्रम में निष्पादित होंगे), एकीकरण-परीक्षण चरण में परीक्षण चलाएं, और उसके बाद चरण 3 और 4 में साफ़ करें पोस्ट-इंटीग्रेशन चरण।
(नोट: मैं वास्तविक स्थापना और सफाई आदेशों के स्थान पर गूंज आदेशों है)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
<configuration>
<forkMode>always</forkMode>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>step1</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>echo</executable>
<arguments>
<argument>foo</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>step2</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>echo</executable>
<arguments>
<argument>bar</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>step3</id>
<goals>
<goal>exec</goal>
</goals>
<phase>post-integration-test</phase>
<configuration>
<executable>echo</executable>
<arguments>
<argument>baz</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>step4</id>
<goals>
<goal>exec</goal>
</goals>
<phase>post-integration-test</phase>
<configuration>
<executable>echo</executable>
<arguments>
<argument>woot</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
मुझे लगता है कि आप उसे अनुकूलित नहीं कर सकते। 'maven-surefire-plugin' + 'maven-surefire-plugin' + 'maven-exec-plugin' एकमात्र तरीका है जिसे आप कर सकते हैं (जब तक कि आप अपने स्वयं के मेवेन प्लगइन को लिखने के लिए पर्याप्त बहादुर नहीं हैं जो आपके लिए यह गठबंधन करेगा)। –