2 years ago
#42875
user2964934
while using local external library in maven, it throws SurefireBooterForkException error
I have created jar of maven project, which contains 2 packages and many different classes. Then, I copied the jar file into another project folder and added dependency as below
<dependency>
<groupId>com.testproject</groupId>
<artifactId>test-project</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/test_project.jar</systemPath>
</dependency>
also added additionalClasspathElements within surefire plugin as below
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>
${project.basedir}/lib/test_project.jar
</additionalClasspathElement>
</additionalClasspathElements>
Now, when I try to extend/inherit any class from the jar file, I am able to see all my methods but when I try to run command mvn test it throws SurefireBooterForkException as below
Can someone please help me in resolving above error?
java
maven
maven-surefire-plugin
0 Answers
Your Answer