读书人

maven2 跳过运作Test的配置

发布时间: 2012-06-28 15:20:03 作者: rapoo

maven2 跳过运行Test的配置

Skipping Tests

To skip running the tests for a particular project, set the skipTests property to true.

<project>    [...]     <build>      <plugins>        <plugin>          <groupId>org.apache.maven.plugins</groupId>          <artifactId>maven-surefire-plugin</artifactId>          <version>2.4.2</version>          <configuration>            <skipTests>true</skipTests>          </configuration>        </plugin>      </plugins>    </build>    [...]   </project>  

?

?

?

You can also skip the tests via command line by executing the following command:

mvn install -DskipTests

If you absolutely must, you can also use the maven.test.skip property to skip compiling the tests. maven.test.skip is honored by Surefire and the Compiler Plugin.

mvn install -Dmaven.test.skip=true

读书人网 >开源软件

热点推荐