Maven not using the local repo

java, maven, maven-plugin

Solution

You must install that jar with install plugin`.

mvn install:install-file -Dfile=[jar] -DgroupId=org.richfaces.cdk \
-DartifactId=maven-cdk-plugin -Dversion=3.3.3.Final -Dpackaging=jar

Maven will keep the structure and generate the things it needs.

Try `mvn clean install -o` to not look in internet for dependencies.

Also `echo $M2_REPO`. it should point to the .m2.

Problem

I'm using maven without m2e, my mvn install is failing because a plugin is not available anymore on maven central. I'm working with an old pom.xml dating from 2008 and must uses maven-cdk-plugin version 3.3.3.Final. Since it was not available anymore I took it on someone else computer and putted it in my .m2 local repo. .m2\org\richfaces\cdk\maven-cdk-plugin\3.3.3.Final however I'm still getting this error. ``` [ERROR] Plugin org.richfaces.cdk:maven-cdk-plugin:3.3.3.Final or one of its depe ndencies could not be resolved: Failed to read artifact descriptor for org.richf aces.cdk:maven-cdk-plugin:jar:3.3.3.Final: Failure to find org.richfaces.cdk:mav en-cdk-plugin:pom:3.3.3.Final in http://uk.maven.org/maven2 was cached in the lo cal repository, resolution will not be reattempted until the update interval of UK has elapsed or updates are forced -> [Help 1] ``` Why would he want to check maven2, it's inside my local repo? D: thanks

Original source