I am using maven 3.2.5. I have one external jars which I need to use in my maven project which is not available in maven repository.
I installed those jars by using following command:
1) mvn install:install-file -Dfile=p-unit-0.15.319.jar -DgroupId=org.punit -DartifactId=p-unit -Dversion=0.15.319 -Dpackaging=jar
2) After this command, I saw in my M2 repository, jar & pom was created .m2\repository\org\punit\p-unit\0.15.319\p-unit-0.15.319.jar .m2\repository\org\punit\p-unit\0.15.319\p-unit-0.15.319.pom
created pom content:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.punit</groupId>
<artifactId>p-unit</artifactId>
<version>0.15.319</version>
<description>POM was created from install:install-file</description>
</project>
3) Updated the pom file
<dependency>
<groupId>org.punit</groupId>
<artifactId>p-unit</artifactId>
<version>0.15.319</version>
<scope>provided</scope>
</dependency>
Issue: When I tried to use class of this jar,
import org.punit.runner.*;
getting error: import org.punit.runner can't be resolved.
I tried many combination to define the dependency but not able to use the classes.
How can I resolve it??