构建时跳过test <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin> 或者命令 mvn clean install -Dmaven.test.skip=true