Maven 添加 memcached
由于maven repository中没有 memcached 所需要的 jar 包,我们需要从
Downloads · gwhalin/Memcached-Java-Client · GitHub
中下载对应版本,手动导入本地maven仓库
导入命令:
mvn install:install-file -Dfile={jarPath} -DgroupId=com.danga -DartifactId=java-memcached -Dversion=2.6.6 -Dpackaging=jar
最后更新以下配置文件中的依赖项
<dependency>
<groupId>com.danga</groupId>
<artifactId>java-memcached</artifactId>
<version>2.6.6</version>
</dependency>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8181</port>
<path>/testing</path>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Name:给自己的web项目的调式运行配置起一个名字
Working directory: 选择你的要运行的web项目的路径
Command line: tomcat7:run (如果你安装的是tomcat7的话,其他版本请使用相应的命令)