网站建设在线商城百度推广登陆平台
nexus框架来搭建私服,并上传jar包到私服
- 搭建私服可以访问地址,这里就不做过多讲述
https://blog.csdn.net/jiang_wang01/article/details/107342744
上传jar包到私服
把jar包 ice-3.4.0.jar包上传到私服
再次查看,发现jar已经上传上去了
从私服依赖jar包
在pom.xml文件配置私服的路径、组id、版本等
<distributionManagement><repository><id>releases</id><url>http://172.16.1.87:8081/nexus/content/repositories/releases/</url><uniqueVersion>true</uniqueVersion></repository><snapshotRepository><id>snapshots</id><url>http://172.16.1.87:8081/nexus/content/repositories/snapshots/</url></snapshotRepository>
</distributionManagement>
<repositories><repository><id>nexus</id><name>nexus</name><url>http://172.16.1.87:8081/nexus/content/groups/public/</url></repository>
</repositories>
在本地仓库中也把私服的jar包下载下来了
总结
- Maven能够很好地管理我们的项目,还能够管理我们的jar包。在构建项目的时候十分方便。
- 安装Maven需要配置JAVA_HOME环境变量。
- Settings.xml 配置了我们的本地仓库位置。
- 过度去中心仓库去加载jar包的话,会非常影响性能的。我们搭建一个私有仓库的话,如果私有仓库有对应的jar包,就可以直接在私有仓库中找了。
- 学会如何在私有仓库的页面上上传jar包上去
- 学会如何在项目上关联私有仓库的jar包