nexus maven 本地仓库配置
2015-06-03 15:03
381 查看
网上的帖子大部分都是可以的,在这我就不用描述了,但是在没有网络的情况下先把仓库给下载完全的帖子网上是没有的。
1.修改pom.xml 这个我就不用说了这个也是可以的,但是 和maven 有关的插件不是通过 nexus 仓库管理的。
2.修改 setting.xml 这是个好办法,这样你仓库的插件还是 jar包都是通过 nexus 来管理的,只要你下载一便,在没有网路的情况下也是可以使用的
在 setting.xml 的profiles 节点下添加一下内容,url 修改为你nexus 仓库的地址
注意以上 <id>nexus</id> 这句话很重要,下面还要用到,名称你可以随便起
找到setting.xml 的末尾添加,默认是有这个标签的只是注释了,这里面的id 就是你 profile 标签的id
1.修改pom.xml 这个我就不用说了这个也是可以的,但是 和maven 有关的插件不是通过 nexus 仓库管理的。
2.修改 setting.xml 这是个好办法,这样你仓库的插件还是 jar包都是通过 nexus 来管理的,只要你下载一便,在没有网路的情况下也是可以使用的
在 setting.xml 的profiles 节点下添加一下内容,url 修改为你nexus 仓库的地址
<profile> <id>nexus</id> <repositories> <repository> <id>central</id> <layout>default</layout> <url>http://localhost:8888/nexus/content/repositories/central/</url> <releases><enabled>true</enabled> </releases> <snapshots><enabled>false</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://localhost:8888/nexus/content/repositories/central/</url> <releases><enabled>true</enabled> </releases> <snapshots><enabled>false</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile>
注意以上 <id>nexus</id> 这句话很重要,下面还要用到,名称你可以随便起
找到setting.xml 的末尾添加,默认是有这个标签的只是注释了,这里面的id 就是你 profile 标签的id
<activeProfiles> <activeProfile>nexus</activeProfile> </activeProfiles>
相关文章推荐
- USB otg 学习笔记
- USB otg 学习笔记
- 线程同步
- Android的GPS的代码分析(二)
- Android的GPS的代码分析(一)
- GIS介绍
- USB otg 学习笔记
- jquery实现checkbox复选框的全选反选
- USB otg 学习笔记 分类: USB OTG驱动 生活百科 2015-06-03 15:03 283人阅读 评论(0) 收藏
- spring ioc 笔记(Spring in action)
- java中的位操作问题
- Intel VT-X
- C# DataSet的基本用法
- NOI 2014 题解
- 第13周项目1-动物这样叫(3抽象类)
- 算法导论第六章总结:堆排序
- MVC4的缓存
- 黑马程序员——Java练习笔记——反射
- 由一段代码说开去系列
- JS简介