错误Maven与mvn测试

时间:2018-05-25 09:48:38

标签: maven build maven-3 maven-plugin

我第一次使用这个工具,我无法正确构建项目。

当我尝试生命周期命令时,它使用干净的验证和编译成功构建。但是当我尝试mvn测试时,它给了我这个错误:

[INFO] --------------------------------------------------------------------- 
---
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------- 
---
[INFO] Total time: 4.410 s
[INFO] Finished at: 2018-05-25T11:33:07+02:00
[INFO] --------------------------------------------------------------------- 
---
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire- 
plugin:2.20.1:test (default-test) on project gdp: Execution default-test of 
goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed. 
:NullPointerException
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
 http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

mvn -v 3.5.3 我正在使用代理,我确实配置了settings.xml文件 请帮忙。 谢谢

1 个答案:

答案 0 :(得分:2)

通过以下方式更改maven-surefire-plugin的版本:

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/plus"
     android:tint="#2c53e5" />