方式1:用命令带上参数
mvn install -Dmaven.test.skip=true
方式2:在pom.xml里面配置
1 2 3 4 5 6 7 8 9 | <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin></plugins> |
idea中运行maven安装jar包到本地仓库跳过test

本文介绍了两种在使用Maven构建项目时跳过测试的方法。第一种是在命令行中使用带有参数`-Dmaven.test.skip=true`的`mvn install`命令;第二种是在项目的pom.xml文件中配置`maven-surefire-plugin`插件,设置`skip`属性为`true`。


被折叠的 条评论
为什么被折叠?



