Maven 本地仓库添加jar包
第一步:win+R,输入cmd
第二步:输入以下命令,按回车。安装、再上传到maven仓库
mvn install:install-file -Dfile=D:\sdk-core-java-1.1.5.jar -DgroupId=com.alibaba -DartifactId=sdk-core-java -Dversion=1.1.5 -Dpackaging=jar
-Dfile : jar包路径
-DgroupId:groupId
-DartifactId:artifactId
-Dversion:版本
mvn deploy:deploy-file -Dfile=/Users/mona/Downloads/dingtalk-2.0.30.jar -DgroupId=com.aliyun -DartifactId=dingtalk -Dversion=2.0.30 -Dpackaging=jar -Durl=http://xxx:xx/repository/ -DrepositoryId=releases
-Dfile : jar包路径
-DgroupId:groupId
-DartifactId:artifactId
-Dversion:版本
-Durl:maven仓库地址
导入成功
对应的pom:
<dependency> <groupId>com.alibaba</groupId> <artifactId>sdk-core-java</artifactId> <version>1.1.5</version> </dependency>