Maven surefire could not find ForkedBooter class

后端 未结 20 2541
盖世英雄少女心
盖世英雄少女心 2020-11-28 19:21

Recently coming to a new project, I\'m trying to compile our source code. Everything worked fine yesterday, but today is another story.

Every time I\'m running

相关标签:
20条回答
  • 2020-11-28 19:47

    I followed this link https://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html and added the below plugin in pom.xml and it worked,

    <project>
      [...]
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.1</version>
            <configuration>
              <useSystemClassLoader>false</useSystemClassLoader>
            </configuration>
          </plugin>
        </plugins>
      </build>
      [...]
    </project>
    
    0 讨论(0)
  • 2020-11-28 19:49

    For me, in Visual Studio Code

    I did not do any changes in the pom.xml file or updated any dependency versions
    Adding this line to settings.json of Visual Studio Code solved the problem.

    "maven.executable.options": "-DforkCount=0",
    
    0 讨论(0)
提交回复
热议问题