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刷新当前页面几种方式
- 下一篇: openoffice 安装 linux环