maven+memecached安装到本地仓库
1、
先执行此命令:
mvn install:install-file -Dfile=G:/java_memcached-release_2.6.6/java_memcached-release_2.6.6.jar -DgroupId=com.danga -DartifactId=memcached -Dversion=2.6.6 -Dpackaging=jar -DgeneratePom=true
2、拷贝依赖到本地仓库依赖目录:
memcached-2.6.6.pom
<?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>com.danga</groupId>
<artifactId>java-memcached</artifactId>
<version>2.6.2</version>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.6</version>
</dependency>
</dependencies>
</project>
注意只是拷贝依赖包
3、填写依赖到工程pom文件:
<dependency>
<groupId>com.danga</groupId>
<artifactId>memcached</artifactId>
<version>2.6.6</version>
</dependency>
4、完事儿