maven学习-settings配置
2016-01-11 00:36
507 查看
1.在settings中配置以上内容,意思是,如果需要下载新包先去私库下载,如果私库没有,私库会从中央库下载到私库,然后本地读取私库内容。
2.maven本地仓库路径
3.配置权限,使用默认用户
4.覆盖所有路径配置,因为Central(中央工厂)默认的snapshots为false,所以覆盖它
5.激活profile
6.配置镜像,想load私库或者中央库的jar包,必须经过私库,如果私库没有,私库从中央库load,然后本地库load私库
注明:mirrorOf也可以用*来标识,*标识所有
<profiles> <profile> <id>nexusProfile</id> <repositories> <!-- 私有库地址--> <repository> <id>nexus</id> <url>http://192.168.1.175:8081/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> </profiles>
2.maven本地仓库路径
<localRepository>D:\Development tools\maven\windows\3.3.9\repository</localRepository>
3.配置权限,使用默认用户
<servers> <server> <id>nexus-releases</id> <username>deployment</username> <password>deployment123</password> </server> <server> <id>nexus-snapshots</id> <username>deployment</username> <password>deployment123</password> </server> </servers>
4.覆盖所有路径配置,因为Central(中央工厂)默认的snapshots为false,所以覆盖它
<profiles> <profile> <id>centralProfile</id> <repositories> <!-- 私有库地址--> <repository> <id>central</id> <url>http://*</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> </profiles>
5.激活profile
<activeProfiles> <activeProfile>centralProfile</activeProfile> </activeProfiles>
6.配置镜像,想load私库或者中央库的jar包,必须经过私库,如果私库没有,私库从中央库load,然后本地库load私库
注明:mirrorOf也可以用*来标识,*标识所有
<mirrors> <id>nexusMirrors</id> <mirrorOf>nexus,central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://192.168.1.175:8081/nexus/content/groups/public/</url> </mirrors>
相关文章推荐
- [每日电路图] 1、基于AT89C52单片机最小系统接口电路【转】
- 记我的2015难忘一年、以及我所使用的那些技术。
- Android源码谜团
- XAML语言介绍
- 随机不重复排序抽取(索引法)
- 自定义cell
- 使用Android Studo开发NDK之Gradle的配置(能debug C代码)
- 少儿读图隐私声明
- Unicode编码格式转换
- 16Java语法回顾之System.in标准的输入输出流
- WinEdt 编辑器和 PDF 文件的 Acrobat 程序关联
- Spring3 整合MyBatis3 配置多数据源 动态选择SqlSessionFactory
- 正则表达式
- Redhat使用CentOS的Yum 网络源
- 注册太麻烦,
- android 开源项目整理
- AFNetworking3.0使用方法
- ASP.Net学习笔记005--ASP.Net的IsPostBack揭秘
- 关于机器学习的一些概念
- Java学习笔记(1)--File类、RandomAccessFile类