Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-cli) on project java01: There are test failures.
Please refer to F:\ideaProjects\com.itheima.maven.java01\target\surefire-reports for the individual test results.
在项目java01上执行目标org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)失败:有测试失败。
请参考F:\ideaProjects\com.itheima.maven。Java01 \target\surefire-报告单个测试结果。
测试是成功了,但是在编译的时候,没有target包。
在junit依赖下添加这个依赖
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
没有target包,然后编译没有
不甘心还是奇奇怪怪的,把上面的依赖删除,就又去检查apache-maven-3.6.1\conf\settings.xml的配置
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
又去检查了ider的maven设置
重新刷新maven工具
还是没有成功,检查发现需要使用平台编码(实际上是UTF-8)来复制过滤的资源,即构建依赖于平台!
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>