maven仓库使用
maven镜像仓库
1.国内maven镜像仓库
阿里云镜像
<mirrors>
<mirror>
<id>aliyun</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</ur>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
开源中国镜像
<mirror>
<id>OSChina</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
repo2 maven仓库
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
net-cn 镜像
<mirror>
<id>net-cn</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://maven.net.cn/content/groups/public/</url>
</mirror>
uk镜像
<mirror>
<id>uk</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>
ibiblio 镜像
<mirror>
<id>ibiblio</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
</mirror>
jboss镜像
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/url>
</mirror>
2.添加maven仓库
2.1在POM中配置远程仓库
<repositories>
<repository>
<id>my-repo</id>
<name>my repository</name>
<url>http://localhost:8080/artifactory/my-repo/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>my-repo</id>
<name>my repository</name>
<url>http://localhost:8080/artifactory/my-repo/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<name>oss.sonatype.org</name>
<id>oss.sonatype.org</id>
<url>http://oss.sonatype.org/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
2.2在settings.xml中配置远程仓库
除了在pox.xml配置仓库,setting文件可以作为一个全局的配置,但并不是简单的将POM中的及元素复制到settings.xml中就可以,setting.xml不直接支持 这两个元素。但我们还是有一个并不复杂的解决方案,就是利用profile,如下:
[html] view plain copy 在CODE上查看代码片派生到我的代码片
<settings>
...
<profiles>
<profile>
<id>dev</id>
<!-- repositories and pluginRepositories here-->
</profile>
</profiles>
<activeProfiles>
<activeProfile>dev</activeProfile>
</activeProfiles>
...
</settings>
这里我们定义一个id为dev的profile,将所有repositories以及pluginRepositories元素放到这个profile中,然后,使用元素自动激活该profile。这样,你就不用再为每个POM重复配置仓库。
maven仓库使用的更多相关文章
- 转:aliyun阿里云Maven仓库地址——加速你的maven构建
maven仓库用过的人都知道,国内有多么的悲催.还好有比较好用的镜像可以使用,尽快记录下来.速度提升100倍. http://maven.aliyun.com/nexus/#view-reposito ...
- aliyun阿里云Maven仓库地址——加速你的maven构建
maven仓库用过的人都知道,国内有多么的悲催.还好有比较好用的镜像可以使用,尽快记录下来.速度提升100倍. http://maven.aliyun.com/nexus/#view-reposito ...
- maven仓库信息分析站点推荐
maven是java的一个依赖,打包管理的工具,稍微大一点的java项目都需要使用maven. 随着java的壮大,maven仓库越来越大,仓库中的jar包有60多万,各种group,各种构件,各种版 ...
- 国内好用的maven仓库,添加到本地nexus中
速度快的maven仓库真的难找,国外网站很多被封了.前天在网上找,有人说阿里有个公开的,速度很快.确实很快! 我添加到本地nexus中,结果不能更新索引,我是这么添加的,如下: 这个地址在浏览器中能够 ...
- Maven最佳实践:Maven仓库(转)
转自:http://juvenshun.iteye.com/blog/359256 什么是Maven仓库 在不用Maven的时候,比如说以前我们用Ant构建项目,在项目目录下,往往会看到一个名为/li ...
- maven 仓库地址:
maven 仓库地址: 共有的仓库 http://repo1.maven.org/maven2/http://repository.jboss.com/maven2/ http://repositor ...
- 配置maven仓库
1.安装完,配置好环境变量 mvn -v 检查是否成功 mvn install 会将项目生成的构件安装到本地maven仓库 2.settings.xml文件配置: 1)修改本地仓库位置 maven_h ...
- 收集的maven 仓库地址(maven repository)
maven 仓库地址: 共有的仓库http://repo1.maven.org/maven2/http://repository.jboss.com/maven2/http://repository. ...
- maven仓库介绍《本地仓库、远程仓库》
在Maven中,任何一个依赖.插件或者项目构建的输出,都可以称之为构件.Maven在某个统一的位置存储所有项目的共享的构件,这个统一的位置,我们就称之为仓库.(仓库就是存放依赖和插件的地方)任何的构件 ...
随机推荐
- Thinkphp源码分析系列(三)– App应用程序类
// +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO ...
- iOS富文本
背景:前些天突然想做一个笔记本功能,一开始,觉得挺简单的呀,一个UITextView,网络缓存也不干了,直接本地NSUserDefault存储,然后完事了,美工,弄几张好看的图片,加几个动画,也就这样 ...
- js中的三元运算符
<script type="text/javascript"> var b=5; (b == 5) ? a="true" : a="fal ...
- 2o_TwoTips
∮Linux 使用的两个小技巧 开启启动脚本 和 环境变量问题 §1.开机启动脚本 && 周期任务 环境 CentOS7:3.10.0-327.el7.x86_64 # head /e ...
- Jquery.cookie.js 源码和使用方法
jquery.cookie.js源码和使用方法 jQuery操作cookie的插件,大概的使用方法如下 $.cookie(‘the_cookie’); //读取Cookie值$.cookie(’the ...
- 44、NLP的其他分词功能测试
1. 命名实体识别功能测试 @Test public void testNer(){ if (NER.create("ltp_data/ner.model")<0) { Sy ...
- C语言的文法分析
<程序> -> <声明> | <程序> <函数> <声明> -> #include<stdio.h>|# ...
- Redis从基础命令到实战之列表类型(List)
经过上一篇基于Redis散列类型的改造后,实战练习中的商品管理已经具备了增加.修改整体.修改部分属性和分页查询功能,但仍然不支持删除商品的功能.这是因为商品总数是以一个自增数字记录的,且关联了新商品k ...
- php返回数据库查询时出现Resource id #2
1.使用php调用MySQL数据库的过程是不是先用mysql_query(SELECT*...)或mysql_list_dbs()等查询函数返回结果指针(mysql查询函数中还有没有这样的返回指针函数 ...
- YII2学习第一天
YII2学习第一天,之前稍微看了看TP,感觉和自己的理念不是很符合,然后转学YII2了. 使用的文档是https://github.com/yiisoft/yii2/tree/master/docs/ ...