使用nexus下载资源
生活随笔
收集整理的這篇文章主要介紹了
使用nexus下载资源
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
【1】使用nexus下載資源
nexus資源
提取碼:e63p
【1】使用nexus下載資源
私服咱們搭建好了,那他是怎么工作的呢?
【1.1】配置settings文件中
maven的setting配置中刪除aliyun的中央倉庫,替換成nexus私服服務器
<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"><!--配置本地倉庫地址--><localRepository>F:/maven-repository/repository</localRepository><proxies></proxies><servers><!-- 定義了開發庫帳號密碼(id與項目POM中的distributionManagement元素id必須一樣--><server><id>snapshots</id><username>admin</username><password>admin123</password></server><server><id>releases</id><username>admin</username><password>admin123</password></server><server><id>thirdparty</id><username>admin</username><password>admin123</password></server></servers><mirrors><!-- 使用nexus私服庫,而我們搭建的nexus的central代理可以已經被我們修改為aliyun的中央庫,所以這里可以不配置,阿里服務--><mirror><id>nexus</id><mirrorOf>*</mirrorOf><name>nexus-mirror</name><url>http://127.0.0.1:8085/nexus/content/groups/public/</url></mirror></mirrors><profiles><!--下載jar源碼--><profile><id>downloadSources</id><properties><downloadSources>true</downloadSources><downloadJavadocs>true</downloadJavadocs></properties></profile><profile><id>nexusProfile</id><!--指定JAR下載地址--><repositories><repository><id>public</id><name>public</name><url>http://127.0.0.1:8085/nexus/content/groups/public/</url><snapshots><enabled>true</enabled></snapshots><releases><enabled>true</enabled></releases><layout>default</layout></repository></repositories><!--指定插件下載地址--><pluginRepositories><pluginRepository><id>public</id><name>public</name><url>http://127.0.0.1:8085/nexus/content/groups/public/</url><snapshots><enabled>true</enabled></snapshots><releases><enabled>true</enabled></releases></pluginRepository></pluginRepositories></profile></profiles><!--激活環境配置--><activeProfiles><activeProfile>downloadSources</activeProfile><activeProfile>nexusProfile</activeProfile></activeProfiles></settings>【1.2】清空本地倉庫
我的本地倉庫F:/maven-repository/repository刪除目錄下所有文件
【1.3】從新配置IDEA
【1.4】測試結果
點擊右側maven刷新
setting文件中并沒有配置aliyun的中央庫,但是jar正常下載,說明我們通過nexus服務器訪問了aliyun倉庫
總結
以上是生活随笔為你收集整理的使用nexus下载资源的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机没有搜索筛选功能,EXCEL中筛选
- 下一篇: python中封装是什么意思_Pytho