Nexus 3.31.1 maven 私服 仓库和IntelliJ IDEA 2021.2 实战篇 linux
生活随笔
收集整理的這篇文章主要介紹了
Nexus 3.31.1 maven 私服 仓库和IntelliJ IDEA 2021.2 实战篇 linux
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- 一、maven配置
- 1. 私服配置
- 2. 替換后的配置
- 二、IntelliJ IDEA
- 2.1. 創建項目
- 2.2. 指定配置
- 2.3. 下載依賴
- 三、nexus3 監控
- 3.1. 查看依賴版本
- 3.2. 版本對比
- 3.3. aliyun 倉庫地址
一、maven配置
1. 私服配置
在本地的maven 配置settings.xml內容,用下面內容覆蓋
<?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"><pluginGroups></pluginGroups><proxies></proxies><servers><server><id>local-test-release</id><username>admin</username><password>admin</password></server></servers><mirrors><mirror><id>local-test-group</id><name>*</name><url>http://127.0.0.1:8081/repository/local-test-group/</url><!--*指的是訪問任何倉庫都使用我們的私服--><mirrorOf>*</mirrorOf></mirror></mirrors><profiles><profile><id>nexus</id><repositories><!-- 私有庫地址--><repository><id>nexus</id><url>http://127.0.0.1:8081/repository/local-test-group/</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository></repositories><pluginRepositories><!--插件庫地址--><pluginRepository><id>nexus</id><url>http://127.0.0.1:8081/repository/local-test-group/</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></pluginRepository></pluginRepositories></profile></profiles><activeProfiles><activeProfile>nexus</activeProfile></activeProfiles></settings>2. 替換后的配置
二、IntelliJ IDEA
idea 測試
新建項目或者在現有的項目中添加依賴都可以,要是在現有的項目中添加MySQL依賴,刷新maven
2.1. 創建項目
2.2. 指定配置
2.3. 下載依賴
三、nexus3 監控
3.1. 查看依賴版本
這里以spring-boot-starter-web 2.5.7依賴查看
咱們只要下載過得maven依賴都會上傳 nexus3 私服倉庫中
3.2. 版本對比
3.3. aliyun 倉庫地址
https://developer.aliyun.com/mvn/guide
總結
以上是生活随笔為你收集整理的Nexus 3.31.1 maven 私服 仓库和IntelliJ IDEA 2021.2 实战篇 linux的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Vue刷新当前页面几种方式
- 下一篇: ETL异构数据源Datax_使用数据分片