GitHub的强大,详细很多小伙伴们都知道了,下面我主要讲解的是两种jar包的上传,
1、第一种是我们自己写的代码想提供给他人或者自己使用
2、第二种是针对一些平台,比如阿里,百度等知名互联网他们提供的jar包制作成我们的maven包,
下面这个名字,建议根据我们所制作的maven的jar包的作用进行命名,因为为了我们已经自己在github上查看方便以及维护方便
hlj-test-github-maven
hlj-managemaent-Id
hlj managemaent name
file://${project.build.directory}/${distributionManagement.directory.name}
maven-deploy-plugin
2.8.1
internal.repo::default::file://${project.build.directory}/${distributionManagement.directory.name}
4.0.0
com.hlj.repo
test-github-maven
0.0.1
jar
com-hlj-github-maven-repo
Demo project for Spring Boot
org.springframework.boot
spring-boot-starter-parent
2.0.4.RELEASE
UTF-8
UTF-8
1.8
hlj-test-github-maven
hlj-managemaent-Id
hlj managemaent name
file://${project.build.directory}/${distributionManagement.directory.name}
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-test
test
org.springframework.boot
spring-boot-maven-plugin
maven-deploy-plugin
2.8.1
internal.repo::default::file://${project.build.directory}/${distributionManagement.directory.name}
mvn clean deploy
[外链图片转存失败(img-RTf9Oh85-1566552732604)(https://raw.githubusercontent.com/HealerJean123/HealerJean123.github.io/master/blogImages/WX20180830-212430.png)]
maven_github
,将hlj-test-github-maven
文件夹复制到我们创建好的maven项目中去
[外链图片转存失败(img-W7Ytrm3h-1566552732605)(https://raw.githubusercontent.com/HealerJean123/HealerJean123.github.io/master/blogImages/[email protected])]
JeandeMBP:hlj healerjean$ cd ~/.m2/repository/com/hlj
JeandeMBP:hlj healerjean$ ls -l
total 0
drwxr-xr-x 6 healerjean staff 204 Aug 30 20:30 repo
JeandeMBP:hlj healerjean$ rm -rf repo
JeandeMBP:hlj healerjean$ ls -l
total 0
JeandeMBP:hlj healerjean$
groupId
,防止产生干扰com.hlj.repo
改为
com.hlj.repo-add
hlj-repo
https://raw.github.com/HealerJean123/maven_github/master/hlj-test-github-maven
com.hlj.repo
test-github-maven
0.0.1
mvn packege
4.0.0
com.hlj.repo
test-github-maven
0.0.1
jar
com-hlj-github-maven-repo
Demo project for Spring Boot
org.springframework.boot
spring-boot-starter-parent
2.0.4.RELEASE
UTF-8
UTF-8
1.8
hlj-test-github-maven
hlj-managemaent-Id
hlj managemaent name
file://${project.build.directory}/${distributionManagement.directory.name}
hlj-repo
https://raw.github.com/HealerJean123/maven_github/master/hlj-test-github-maven
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-test
test
com.hlj.repo
test-github-maven
0.0.1
org.springframework.boot
spring-boot-maven-plugin
maven-deploy-plugin
2.8.1
internal.repo::default::file://${project.build.directory}/${distributionManagement.directory.name}
参考下面的,将它先导入本地maven仓库,然后我们直接将生成的文件夹taobao-sdk-java
上传到上面那个仓库中
mvn install:install-file -Dfile=taobao-sdk-java-5.2.1.jar -DgroupId=taobao-sdk-java -DartifactId=taobao-sdk-java -Dversion=5.2.1 -Dpackaging=jar
taobao-sdk-java
taobao-sdk-java
5.2.1
maven-metadata.xml
文件[外链图片转存失败(img-bpujMu45-1566552732606)(https://raw.githubusercontent.com/HealerJean123/HealerJean123.github.io/master/blogImages/[email protected])]
com.hlj
com-hlj-github-maven-repo
0.0.1-SNAPSHOT
20180830123020
com.hlj.repo
com.hlj.repo
logback-access-
0.0.1
com.hlj.repo
logback-classic
0.0.1
hlj-artifactId
hlj-test-github-maven
hlj-managemaent-Id
hlj managemaent name
file://${project.build.directory}/${distributionManagement.directory.name}
hlj-repo
https://raw.github.com/HealerJean123/maven_github/master/hlj-test-github-maven
com.hlj.repo
test-github-maven
0.0.1