0

目前我有一些非常繁重的测试,我只想在安装 Maven 包之前运行它们。我无法将其传达给我的 pom,到目前为止包括:

 <plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-surefire-plugin</artifactId>
   <version>2.13</version>
   <executions>
     <execution>
       <id>dummied-test</id>
       <phase>test</phase>
       <goals>
         <goal>test</goal>
       </goals>
       <configuration>
         <skip>true</skip>
       </configuration>
     </execution>
     <execution>
       <id>test-in-verify-phase</id>
       <phase>verify</phase>
       <goals>
         <goal>test</goal>
       </goals>
     </execution>
   </executions>
 </plugin>

你可以猜到我 1) 首先尝试将其绑定到verify阶段,2) 尝试将其显式添加到test没有目标的阶段,3) 将其添加到设置为 true的test阶段...skip

如何告诉 Maven 在测试阶段不要运行测试?

4

1 回答 1

0

需要在configuration标签之外添加executions标签。为什么?我不完全理解这一点,但我想我只是添加了另一个跳过测试的执行。根据此资源: http ://docs.codehaus.org/pages/viewpage.action?pageId=62120

于 2013-02-21T21:42:19.557 回答