Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test

前端 未结 14 1893
夕颜
夕颜 2020-11-29 16:35

I have scoured the internet for almost five days now looking for a fix to this issue, but I cannot seem to find and fix it on my own, mainly because I am so new to both Mave

相关标签:
14条回答
  • 2020-11-29 17:11

    I had same issue, I resolved from below steps:

    1. Right click on project->maven->Update project
    2. Here I selected "force update for snapshot/release"
    3. After that I compiled again my project and issue got fixed
    0 讨论(0)
  • 2020-11-29 17:15

    I had a similar problem, and the solution for me was quite different from what the other users posted.

    The problem with me was related to the project I was working last year, which required a certain proxy on maven settings (located at <path to maven folder>\maven\conf\settings.xml and C:\Users\<my user>\.m2\settings.xml). The proxy was blocking the download of required external packages.

    The solution was to put back the original file (settings.xml) on those places. Once things were restored, I was able to download the packages and everything worked.

    0 讨论(0)
  • 2020-11-29 17:16

    For me changing the Jenkins version helped.

      <parent>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>1.642.4</version><!-- which version of Jenkins is this plugin built against? -->
      </parent>
    
    0 讨论(0)
  • 2020-11-29 17:17

    Sometimes you get similar sounding errors but for reasons that're really not related to the tools - in this case Surefire plugin.

    For me I was getting a similar error but the reason was i wasn't pointing to the correct DB url !

    Among a lot of verbosity (using mvn -X flag) I saw a timeout message.

    One trick I did was to install IntelliJ on the build server (for debugging purpose) and fixing problems through it first and then uninstalling it and making sure everything works on build server as well.

    0 讨论(0)
  • 2020-11-29 17:20

    I had a similar problem but all answers here didn't help me.

    For me the problem was a failing test. If you are doing test driven development than a failing / not implemented test shouldn't break the build. I still want my project to build.

    To solve this I added a configuration to surefire so that it ignores a failing test.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
            <testFailureIgnore>true</testFailureIgnore>
        </configuration>
    </plugin>
    
    0 讨论(0)
  • 2020-11-29 17:20

    I faced the same error, but in my case, the problem was resolved after deleting the /target folder and nbactions.xml file.

    0 讨论(0)
提交回复
热议问题