maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Sewe <s...@st.informatik.tu-darmstadt.de>
Subject Re: maven-failsafe-plugin: multiple executions using the same test classes
Date Fri, 15 Jan 2010 11:10:14 GMT
Hi Stephen,

you wrote:
> hack solution = multiple executions of verify?

Just for the record: Typing-wise this isn't too bad. However, I think 
the solution below should *not* work -- but it does!

   <plugin>
     <groupId>org.codehaus.mojo</groupId>
     <artifactId>failsafe-maven-plugin</artifactId>
     <executions>
       <execution>
         <id>first</id>
         <goals>
           <goal>integration-test</goal>
           <goal>verify</goal>
         </goals>
         <configuration>
           <reportsDirectory>
             ${project.build.directory}/failsafe-reports/first
           </reportsDirectory>
           <summaryFile>
 
${project.build.directory}/failsafe-reports/first/failsafe-summary.xml
           </summaryFile>
         </configuration>
       </execution>
       <!-- And again for the second execution -->
     </executions>
   </plugin>

Why does this works? After all, the <phase> element is only allowed once 
within an <execution> and then applies to all goals found therein. But 
the two goals are definitely bound to different phases (their respective 
default phases); "mvn post-integration-test" does not execute the 
"verify" goal.

Is this a bug in Maven or a behavior I can rely on in my builds? If so, 
I am quite happy with this configuration.

Best wishes,

Andreas Sewe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message