欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Maven打包Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2

程序员文章站 2024-02-23 09:52:10
...

转载:https://blog.csdn.net/qq_16513911/article/details/90138290


出现的错误:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboot-03-web: There are test failures.

Please refer to D:\Users\lenovo\SpringBoot\springboot-03-web\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

解决办法:
①在pom.xml最下面添加配置就好了,

<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
			<!--添加配置跳过测试-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.1</version>
				<configuration>
					<skipTests>true</skipTests>
				</configuration>
			</plugin>
		</plugins>
</build>
相关标签: Maven SpringBoot