Adding memcahced for Java projects
I haven't found Memcached.jar's config XML in mvnrepository for half a day,
Since there is no official MAVEN repository available for the Java memcached client at this time, it needs to be manually installed to the local repository when used. Java memcached Client jar package: Https://github.com/gwhalin/Memcached-Java-Client/downloads current 2.6.6 version of Java memcached The client relies on the Slf4j-simple, Slf4j-api, commons-pool three packages, so we can edit a pom file for it, install the Java memcached Client's jar package and the Pom file, and solve the Java Memcached client dependency on other jar packages. installation command:
MVN Install:install-file-dfile=f:\comm\youboy\java_memcached-release_2.6.6\java_memcached-release_2.6.6.jar- Dpomfile=f:\comm\youboy\java_memcached-release_2.6.6\pom.xml
Directory changed to self-
In the project, you can refer to the
<!--memcached--><dependency><groupid>com.danga</groupid><artifactid> Java-memcached</artifactid><version>2.6.6</version></dependency>
the contents of Java-memcached-2.6.6.pom are as follows:
<?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.6</version> <dependencies > <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple< /artifactid> <version>1.6.1</version> </dependency> <dependency> &L T;groupid>org.slf4j</groupid> <artifactId>slf4j-api</artifactId> <version>1.6 .1</version> </dependency> <dependency> <groupId>commons-pool</groupId> <artifactid>commons-pool</artifactid> <version>1.5.6</version> </dependency> </dependencies> </project& Gt
Maven Add Memcached.jar Configuration method