解决Maven无法下载fastdfs-client-java依赖

异常信息:Missing artifact org.csource:fastdfs-client-java:jar:1.27-SNAPSHOT

解决方案:jar包在Maven的中央仓库中缺失,需要手动安装jar包

https://github.com/happyfish100/fastdfs-client-java 下载

git clone https://github.com/happyfish100/fastdfs-client-java.git
# 进入下载好的fastdfs-client-java 解压
$ cd /fastdfs-client-java 
# 使用maven打包jar
$ mvn clean install

 

构建完成后

  • 会自动把fastdfs-client-java-1.27-SNAPSHOT.jar安装到本地的Maven仓库
[INFO] Installing /Users/mht/Downloads/fastdfs-client-java-master/target/fastdfs-client-java-1.27-SNAPSHOT.jar to /Users/mht/.m2/repository/org/csource/fastdfs-client-java/1.27-SNAPSHOT/fastdfs-client-java-1.27-SNAPSHOT.jar
[INFO] Installing /Users/mht/Downloads/fastdfs-client-java-master/pom.xml to /Users/mht/.m2/repository/org/csource/fastdfs-client-java/1.27-SNAPSHOT/fastdfs-client-java-1.27-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  04:02 min
[INFO] Finished at: 2018-11-21T18:12:05+08:00
[INFO] ------------------------------------------------------------------------
mhtdeMacBook-Pro:fastdfs-client-java-master mht$ 

 

  • pom.xml 可以引入了
<dependency>
    <groupId>org.csource</groupId>
    <artifactId>fastdfs-client-java</artifactId>
    <version>1.27-SNAPSHOT</version>
</dependency>

 


转载链接:https://www.jianshu.com/p/c39ca1ee222b
posted @ 2019-07-18 17:59  佩奇er  阅读(2076)  评论(0编辑  收藏  举报