mvn test报错

来源:2-2 第一个maven案例hellomaven

modify

2020-02-16 23:21

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project maven01-model: There are test failures.

-----------------------------------------------

在pom.xml中加入如下内容后:

<build>
		<plugins>
					<plugin>				
					<groupId>org.apache.maven.plugins</groupId>				
					<artifactId>maven-surefire-plugin</artifactId>				
					<version>2.10</version>				
					<configuration>				
					<skipTests>true</skipTests>				
					</configuration>			
					</plugin>		
		</plugins>	
</build>

----------------------------------------------------------------------------------------------

再次执行mvn test

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building maven01-model 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ maven01-model ---

[debug] execute contextualize

[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory D:\apache-maven-3.0.5\code\maven01\src\main\resources

[INFO]

[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ maven01-model ---

[INFO] Nothing to compile - all classes are up to date

[INFO]

[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ maven01-model ---

[debug] execute contextualize

[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory D:\apache-maven-3.0.5\code\maven01\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ maven01-model ---

[INFO] Nothing to compile - all classes are up to date

[INFO]

[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ maven01-model ---

[INFO] Tests are skipped.

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.676s

[INFO] Finished at: Sun Feb 16 23:13:33 CST 2020

[INFO] Final Memory: 7M/154M

[INFO] ------------------------------------------------------------------------

------------------------------------------------------------------------------------

有两个警告,怎么解决?

写回答 关注

2回答

项目管理利器——maven

使用maven来构建和管理Java项目,从环境配置,到maven核心知识

173033 学习 · 789 问题

查看课程