I am new to Maven Project. I am making changes to one of the open source maven project. I am facing a problem in adding a library to the project. So far i have done this :-
- I added a library named jni4net.j-0.8.8.0.jar to the resources folder of the project.
- I right clicked the jar(in Intellij) and clicked 'Add as library'.
Then in the pom.xml i added:-
<dependency> <groupId>jar.0.8.8.0.jni4net</groupId> <artifactId>jar.0.8.8.0.jni4net</artifactId> <version>0.8.8.0</version> <scope>system</scope> <systemPath>${basedir}/src/main/resources/jni4net.j- 0.8.8.0.jar</systemPath> </dependency>
But when i build this project(build is successful, test cases are running) and use this it throws following error:-
java.lang.NoClassDefFoundError: net/sf/jni4net/Bridge
Please help me resolve it. I am new to maven and pom. I have looked at various answers, but not getting it right. PS - I named groupId and artifactID as just reverse of jar file