maven Repository Configuration
来源:互联网 发布:星际淘宝网最新章节 编辑:程序博客网 时间:2024/05/22 09:17
maven Repository Configuration
Posted on 2009-11-02 11:25 不需要解释 阅读(656) 评论(0) 编辑 收藏 所属分类: mavenRepositories are remote collections of projects from which Maven uses to populate the local repository of the build system. It is from this local repository that Maven calls it plugins and dependencies. Different remote repositories may contain different projects, and under the active profile they may be searched for a matching release or snapshot artifact.
Example A.8. Repository Configuration in settings.xml
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> ... <profiles> <profile> ... <repositories> <repository> <id>codehausSnapshots</id> <name>Codehaus Snapshots</name> <releases> <enabled>false</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> <url>http://snapshots.maven.codehaus.org/maven2</url> <layout>default</layout> </repository> </repositories> <pluginRepositories> ... </pluginRepositories> ... </profile> </profiles> ...</settings>
- releases, snapshots
These are the policies for each type of artifact, Release or snapshot. With these two sets, a POM has the power to alter the policies for each type independent of the other within a single repository. For example, one may decide to enable only snapshot downloads, possibly for development purposes.
- enabled
true
orfalse
for whether this repository is enabled for the respective type (releases or snapshots).- updatePolicy
This element specifies how often updates should attempt to occur. Maven will compare the local POMs timestamp to the remote. The choices are:
always
,daily
(default),interval:X
(where X is an integer in minutes) ornever
.- checksumPolicy
When Maven deploys files to the repository, it also deploys corresponding checksum files. Your options are to
ignore
,fail
, orwarn
on missing or incorrect checksums.- layout
In the above description of repositories, it was mentioned that they all follow a common layout. This is mostly correct. Maven 2 has a default layout for its repositories; however, Maven 1.x had a different layout. Use this element to specify which if it is default or legacy. If you are upgrading from Maven 1 to Maven 2, and you want to use the same repository which was used in your Maven 1 build, list the layout as
legacy
- maven Repository Configuration
- maven repository
- maven repository
- maven repository
- maven repository
- maven: repository
- maven repository
- maven repository
- maven repository
- maven repository
- maven repository
- maven repository
- maven configuration
- Maven dependency and repository
- Maven dependency and repository
- Javamail in maven repository
- maven仓库repository
- vaadin repository of maven
- jdk的安装和tomcat的配置
- Java Swing中两种设置背景图(容器图片)
- discuz!x2.5登录管理面板
- hdu 3037 Saving Beans
- (转)Android的monkey测试
- maven Repository Configuration
- UML 2----Sequence Diagram
- eclipse与jre的桥梁--path、关于程序import的包
- 黑马程序员_IO流概述
- 2013.11.19
- setjmp.h
- 0-1背包问题的一种解法
- Struts中forward与global-forward的区别
- 设置提示音