安裝java memcached client到maven repository

來源:互聯網
上載者:User

標籤:

由於目前java memcached client沒有官方的maven repository可供使用,因此使用時需要手動將其安裝到本地repository。java memcached client的jar包:https://github.com/gwhalin/Memcached-Java-Client/downloads 目前2.6.2版本的java memcached client要依賴slf4j-simple、slf4j-api、commons-pool三個包,依此我們可以為其編輯一個pom檔案,將java memcached client的jar包和pom檔案一起安裝,解決java memcached client對其他jar包的依賴。安裝命令:

mvn install:install-file -Dfile=/path/to/java-memcached-release_2.6.2.jar -DpomFile=/path/to/java-memcached-2.6.2.pom

其中java-memcached-2.6.2.pom的內容為:

[html]  view plain copy
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <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"  
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  
  4.   <modelVersion>4.0.0</modelVersion>  
  5.   <groupId>com.danga</groupId>  
  6.   <artifactId>java-memcached</artifactId>  
  7.   <version>2.6.2</version>  
  8. <dependencies>  
  9.     <dependency>  
  10.         <groupId>org.slf4j</groupId>  
  11.         <artifactId>slf4j-simple</artifactId>  
  12.         <version>1.6.2</version>  
  13.     </dependency>  
  14.     <dependency>  
  15.         <groupId>org.slf4j</groupId>  
  16.         <artifactId>slf4j-api</artifactId>  
  17.         <version>1.6.2</version>  
  18.     </dependency>  
  19.     <dependency>  
  20.         <groupId>commons-pool</groupId>  
  21.         <artifactId>commons-pool</artifactId>  
  22.         <version>1.5.6</version>  
  23.     </dependency>  
  24. </dependencies>  
  25. </project>  

安裝java memcached client到maven repository

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.