maven 配置私服 连接
两种方法:
1.在单个项目的pom.xml中使用 私服的连接地址,这样只对该项目起作用。
2.在maven的setting.xml配置中添加私服的连接地址。这样对所有项目起作用。
本文章只演示第二种方法:
1.确保nexus私服安装完成并启动。
2.修改本机maven/conf/setting.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">
- //maven的仓库位置
- <localRepository>D:\MAVEN_repository</localRepository>
- <pluginGroups> </pluginGroups>
- <proxies> </proxies>
- //maven操作nexus的权限设置
- </servers>
- <server>
- <id>nexus-releases</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- <server>
- <id>nexus-snapshots</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- <server>
- <id>3rd-proty</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- </servers>
- //配置镜像,让maven只使用私服获取
- <mirrors>
- <mirror>
- <id>nexus</id>
- <name>Nexus Repository</name>
- <url>http://10.0.27.61:8081/content/groups/public</url>
- <mirrorOf>*</mirrorOf>
- </mirror>
- </mirrors>
- //配置仓库车插件,一旦配置了镜像,则 这个配置可忽略
- <profiles>
- <profile>
- <id>nexus</id>
- <repositories>
- <repository>
- <id>nexus</id>
- <url>http://10.0.27.61:8081/content/groups/public</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>nexus</id>
- <url>http://10.0.27.61:8081/content/groups/public</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
- //激活上面的配置
- <activeProfiles>
- <activeProfile>nexus</activeProfile>
- </activeProfiles>
- </settings>
maven 配置私服 连接的更多相关文章
- Maven配置私服仓库
首先就是,最基本的打开maven的配置文件,上面是我自己的习惯,多留一个以备不坏 打开setting配置文件,来修改路径(本人不习惯将所有软件放在C盘,一般都是单独存放盘) 接下来就是公司给你的账户和 ...
- maven配置私服中可能遇到的问题
文章目录 之前要写一个hsf的demo,maven的依赖是需要alibaba的私服的,所以出现了下面的错误. 具体参看另一篇文章:https://blog.csdn.net/dataiyangu/ar ...
- maven配置私服
1先配置maven的配置文件 2在项目的pom.xml文件增加 <distributionManagement> <repository> <id>nexus-re ...
- maven配置(安装&使用&私服)文档
1.Maven 环境搭建 Maven 是一个基于 Java 的工具,所以要做的第一件事情就是安装 JDK. 系统要求 项目 要求 JDK Maven 3.3 要求 JDK 1.7 或以上 Maven ...
- 通过Maven配置测试环境和开发环境连接不同的数据库
通过Maven配置测试环境和开发环境连接不同的数据库 作者及来源: 通灵宝玉 - 博客园 收藏到→_→: 此文来自: 马开东博客 网址:http://www.makaidong.com ...
- MAVEN总结,整合Eclipse以及配置私服
对maven的理解 我们知道maven是一个项目管理工具,其核 心特点就是通过maven可以进行jar包的依赖管理,保证jar包版本的一致性,以及可以使多个项目共享jar包,从而能够 在开发大型jav ...
- SpringMVC+Spring+Mybatis整合,使用druid连接池,声明式事务,maven配置
一直对springmvc和mybatis挺怀念的,最近想自己再搭建下框架,然后写点什么. 暂时没有整合缓存,druid也没有做ip地址的过滤.Spring的AOP简单配置了下,也还没具体弄,不知道能不 ...
- 配置Maven从私服下载构件
--------------------siwuxie095 配置 Maven 从私服下载构件 从 Nexus ...
- 配置maven从私服上下载构件
maven 本地setting.xml配置 <!--配置maven从私服上下载构件 --> <profiles> <profile> <repositorie ...
随机推荐
- Python中的四种数据结构
Python中的内置数据结构(Built-in Data Structure):列表list.元组tuple.字典dict.集合set,涵盖的仅有部分重点. 目录: 一.列表list 二.元组tup ...
- 安装运行zookeeper的坑
从官网下载zookeeper的地址中有俩文件 一个是apache-zookeeper-3.5.5.tar.gz ,另一个是apache-zookeeper-3.5.5-bin.tar.gz 若是使用前 ...
- 常用的框架伪静态(Apache转Nginx)
EmpireCMS: rewrite ^([^\.]*)/listinfo-(.+?)-(.+?)\.html$ $/e/action/ListInfo/index.php?classid=$& ...
- node.js--使用Express中app.use()分模块开发
app.use(path,callback)中的callback既可以是router对象又可以是函数:将一个URL路径与一个函数绑定,第一个参数为访问的路径,如果第一参数为空,则表示任何路径都触发这个 ...
- 72. Edit Distance (JAVA)
Given two words word1 and word2, find the minimum number of operations required to convert word1 to ...
- rpmdb: Thread/process 10646/3086534416 failed: Thread died in Berkeley DB library
明明用rpm查看包存在,但删除的时候进程就停住了.后来出现以下错误:rpmdb: Thread/process 10646/3086534416 failed: Thread died in Berk ...
- 通过TCP传送结构体的问题
这个问题在其他博客中已经给出了解决方案,这里结合自己的Demo说一下. 函数调用的库文件是基于TCP协议的封装,在传送消息体的时候,发送消息结果大体如下: XXXXPost(srcid, EVENT, ...
- 安装CRMEasy步骤
生成CRMEasy安装包的步骤: 所需文件: InstallShieldExpress软件 CRMEasy.iwz工程文件 XP系统(虚拟机即可) 安装 CRMEasy 步骤: 1.windows X ...
- Windows10家庭版的功能中没有Hyper-V的解决方法
1.在桌面新建记事本 将下面的内容复制到编辑器或者记事本当中 pushd "%~dp0" dir /b %SystemRoot%\servicing\Packages\*Hyper ...
- DevExpress Windows 10 v19.1新版亮点:UWP控件新功能全面解析
行业领先的.NET界面控件DevExpress 日前正式发布v19.1版本,本站将以连载的形式介绍各版本新增内容.在本系列文章中将为大家介绍DevExpress WPF v19.1中新增的一些控件及部 ...