Maven添加本地依赖
用mvn命令把本地jar包添加到maven仓库:
mvn install:install-file -Dfile=f:\aliyn-openservices.jar -DgroupId=com.aliyun -DartifactId=openservices -Dversion=1.0.0 -Dpackaging=jar
注意,上述代码,maven会把D:\openservices-1.0.0.jar拷贝到maven本地仓库里。
然后添加 pomy依赖:
<groupId>com.aliyun</groupId>
<artifactId>openservices</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
在使用阿里云的存储服务OSS时,利用Java开发包时出现
[ERROR] [http-bio-8080-exec-18 11:32:41] (_500_jsp.java:_jspService:86) org/jdom/input/SAXBuilder
java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
这是因为少了jdom的包,加入依赖,为:
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1.3</version>
</dependency>
转载请注明出处:
原文:http://blog.csdn.net/hongchangfirst/article/details/8050947
作者:hongchangfirst