Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MAVEN SUREFIRE PLUGIN ERROR

Im building a custom maven project for jenkins. After using the command

   mvn -Plight-test install

I recieve this error .Please help. I have also added the plugin for surefire exception in the pom.xml file, but it isn't working! The error log is as follows :

    [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

Compile : enter image description here

like image 546
Learner Avatar asked Jul 09 '26 15:07

Learner


1 Answers

I had the same issues and I found out that the problem was that some of tests tried to create a System link and it was not possible because I didn't start my IDE (IntellijIdea) as administrator in Windows. I started Intellij as administrator and that solved the problem.

Skipping test is not a good practice when developing.

like image 167
Govan Avatar answered Jul 12 '26 06:07

Govan