Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When Jenkins Building a maven project gave Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter Jenkins [duplicate]

Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter Jenkins.

The following error I got from building a maven project from jenkins.

like image 823
Malinda Peiris Avatar asked Nov 06 '18 06:11

Malinda Peiris


1 Answers

I added this to my pom xml plugins. Which Resolved all my problems.

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.1</version>
            <configuration>
                <useSystemClassLoader>false</useSystemClassLoader>
            </configuration>
        </plugin>
like image 108
Malinda Peiris Avatar answered Oct 07 '22 15:10

Malinda Peiris