Eclipse Add maven dependency cannot find jar in Maven library
In the development, often need to add third-party jar to Maven library, add Jar method, there is not much introduction, online a lot, the following is to add Dana's memcached client jar example to illustrate the problems encountered and solutions.
1. Installing a third-party jar
into CMD,
f:\java_memcached-release_2.6.6>mvn install:install-file-dfile=java_memcached-r
Elease_2.6.6.jar-dgroupid=com.dana-dartifactid=memcached-dversion=2.6.6-dpac
Kaging=jar-dgeneratepom=true
This installs our third-party jar in our local library!
2. Rebuild the Maven local library (Repository) index (window->show view->other->maven->meven repositorise Click OK and click Local in the View repositorise Right-click Rubuild Index)
In fact, this step is equivalent to having Maven re-index the jar in the local responsitory so that we can search the package for our newly installed jar.
Eclipse add maven third-party jar package