运行mvn install时跳过Test
方法一:
[html] view plain copy
print?
- <project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.18.1</version>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
- [...]
- </project>
<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build> [...]</project>
方法二:
mvn install -DskipTests
或者
mvn install -Dmaven.test.skip=true
详情参考:http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html
原文地址:https://www.cnblogs.com/jpfss/p/9042326.html
时间: 2024-10-06 04:23:35