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在某个统一的位置存储所有项目的共享的构件,这个统一的位置,我们就称之为仓库.(仓库就是存放依赖和插件的地方)任何的构件 ...
随机推荐
- docker理念:不可变基础设施
不可变基础设施 1.什么是Immutable Infrastructure Immutable Infrastructure,直译过来就是不可变基础设施. 它是由Chad Fowler于2013年提出 ...
- Vagrant+virtualBox+pycham+python环境的安装及配置
概要: 通过Vagrant,virtualBox安装配置,把virtualBox虚拟机的linux项目映射windows本地项目中,在windows的pycharm工具中开发用python语言开发项目 ...
- LR12.53—第1课:构建Vuser脚本
第1课:构建Vuser脚本 要生成系统上的负载,首先建立一个可以运行以模拟真实用户行为Vuser脚本.您使用VuGen创建和构建Vuser脚本. 在这一课中,你将涵盖以下主题: 介绍VuGen将 - ...
- 微服务实战系列--Nginx官网发布(转)
这是Nginx官网写的一个系列,共七篇文章,如下 Introduction to Microservices (this article) Building Microservices: Using ...
- 页面可见生Page Visibility
Page Visibility 会在浏览器的 document 对象上添加两个属性 hidden 和 visibilityState .如果当前的标签被激活了,那么 document.hidden 的 ...
- Myeclispe 安装 SVN :
Myeclispe 安装 SVN :解压 : site-1.8.22.zip 放入如下路径下即可 :
- 各版本CRM所需端口号
以下是微软官方提供的CRM端口号列表,收藏一下: 4.0 :https://msdn.microsoft.com/en-us/library/dd979226(v=crm.6).aspx This s ...
- 发邮件 和 excel导出中文文件名
/** * 发邮件 * @param email * @param subject * @param body * @throws UnsupportedEncodingException */ pu ...
- flash开发几个问题
1.跨域请求xml或txt 问题,使用URLLoader,不能跨域使用 2.js和swf交互问题,尽量使用swfobject.js动态创建
- urllib.urlretrieve的用法
urllib.urlretrieve(url, local, cbk) urllib.urlretrieve(p,'photo/%s.jpg'%p.split('/')[-4]) url要下载的网站 ...