MAVEN SUREFIRE PLUGIN ERROR

时间:2016-05-05 07:07:54

标签: java maven jenkins jenkins-plugins maven-surefire-plugin

我正在为詹金斯建立一个自定义maven项目。使用命令后

   mvn -Plight-test install

我收到了这个错误。请帮忙。我还在pom.xml文件中添加了surefire异常插件,但它无效!错误日志如下:

    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO]
    [INFO] Jenkins main module ................................ SUCCESS [ 11.809 s]
    [INFO] Jenkins cli ........................................ SUCCESS [ 38.319 s]
    [INFO] Jenkins core ....................................... FAILURE [11:15 min]
    [INFO] Jenkins war ........................................ SKIPPED
    [INFO] Tests for Jenkins core ............................. SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 12:10 min
    [INFO] Finished at: 2016-05-05T12:26:54+05:30
    [INFO] Final Memory: 39M/277M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project jenkins-core:
    .
    [ERROR]
    [ERROR] Please refer to C:\Users\Anishas\git\jenkins\core\target\surefire-reports for the individual test results.
    [ERROR] -> [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/MojoFailureException
    [ERROR]
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR]   mvn <goals> -rf :jenkins-core

enter image description here

编译: enter image description here

3 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,我发现问题是有些测试试图创建一个系统链接而且这是不可能的,因为我没有在Windows中以管理员身份启动我的IDE(IntellijIdea)。 我以管理员身份启动了Intellij,解决了这个问题。

开发时,跳过测试不是一个好习惯。

答案 1 :(得分:1)

使用mvn -Plight-test install -rf jenkins-core -X重新运行以隔离错误

答案 2 :(得分:1)

mvn -Dmaven.test.skip=true -DskipTests=true clean install

使用此命令