Install an external jar into local Maven Repository
Adding a jar package to the maven library solves the problem of how to add dependency.
The original Article is in English. I don't know why, so I can't open it, so I have to use a Google snapshot to open it.
Sometimes, you project will have dependency on a jar which is not in officialMaven Repository, And maybe it is propriety JAR file which will never be partMaven Repository. In this case, you have to put it to your localRepositoryYour self to solve the dependency.
There is a install plug in to do this job, which is something like:
MVN install: install-file-dgroupid = <your_group_name> \-dartifactid = <your_artifact_name> \-dversion = <snapshot> \-dfile = <strong> \-dpackaging = jar \-dgeneratepom = true
For example, you want to install the danga's memcached client plugin, You can do:
MVN install: Install-file-dgroupid = com. danga \-dartifactid = memcached \-dversion = 2.0.1 \-dfile = java_memcached-release_2.0.1.jar \-dpackaging = jar \-dgeneratepom = true
This will add the memcache jar into your local maven2RepositoryUnder groupid com. danga and artifactid memcached, you can then edit your pom. xml adding this dependency.
However,MavenEclipse can not recognize it since it always search from publicRepository.