svn-gvsig-desktop / tags / v1_10_0_Build_1263_RC2 / build / maven / conf / settings.xml @ 41653
History | View | Annotate | Download (9.43 KB)
1 | 20506 | jcampos | <!--
|
---|---|---|---|
2 | Licensed to the Apache Software Foundation (ASF) under one
|
||
3 | or more contributor license agreements. See the NOTICE file
|
||
4 | distributed with this work for additional information
|
||
5 | regarding copyright ownership. The ASF licenses this file
|
||
6 | to you under the Apache License, Version 2.0 (the
|
||
7 | "License"); you may not use this file except in compliance
|
||
8 | with the License. You may obtain a copy of the License at
|
||
9 | |||
10 | http://www.apache.org/licenses/LICENSE-2.0
|
||
11 | |||
12 | Unless required by applicable law or agreed to in writing,
|
||
13 | software distributed under the License is distributed on an
|
||
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
15 | KIND, either express or implied. See the License for the
|
||
16 | specific language governing permissions and limitations
|
||
17 | under the License.
|
||
18 | -->
|
||
19 | |||
20 | <!--
|
||
21 | | This is the configuration file for Maven. It can be specified at two levels:
|
||
22 | |
|
||
23 | | 1. User Level. This settings.xml file provides configuration for a single user,
|
||
24 | | and is normally provided in $HOME/.m2/settings.xml.
|
||
25 | |
|
||
26 | | NOTE: This location can be overridden with the system property:
|
||
27 | |
|
||
28 | | -Dorg.apache.maven.user-settings=/path/to/user/settings.xml
|
||
29 | |
|
||
30 | | 2. Global Level. This settings.xml file provides configuration for all maven
|
||
31 | | users on a machine (assuming they're all using the same maven
|
||
32 | | installation). It's normally provided in
|
||
33 | | ${maven.home}/conf/settings.xml.
|
||
34 | |
|
||
35 | | NOTE: This location can be overridden with the system property:
|
||
36 | |
|
||
37 | | -Dorg.apache.maven.global-settings=/path/to/global/settings.xml
|
||
38 | |
|
||
39 | | The sections in this sample file are intended to give you a running start at
|
||
40 | | getting the most out of your Maven installation. Where appropriate, the default
|
||
41 | | values (values used when the setting is not specified) are provided.
|
||
42 | |
|
||
43 | |-->
|
||
44 | <settings>
|
||
45 | <!-- localRepository
|
||
46 | | The path to the local repository maven will use to store artifacts.
|
||
47 | |
|
||
48 | | Default: ~/.m2/repository
|
||
49 | <localRepository>/path/to/local/repo</localRepository>
|
||
50 | -->
|
||
51 | |||
52 | <!-- interactiveMode
|
||
53 | | This will determine whether maven prompts you when it needs input. If set to false,
|
||
54 | | maven will use a sensible default value, perhaps based on some other setting, for
|
||
55 | | the parameter in question.
|
||
56 | |
|
||
57 | | Default: true
|
||
58 | <interactiveMode>true</interactiveMode>
|
||
59 | -->
|
||
60 | |||
61 | <!-- offline
|
||
62 | | Determines whether maven should attempt to connect to the network when executing a build.
|
||
63 | | This will have an effect on artifact downloads, artifact deployment, and others.
|
||
64 | |
|
||
65 | | Default: false
|
||
66 | <offline>false</offline>
|
||
67 | -->
|
||
68 | |||
69 | <!-- proxies
|
||
70 | | This is a list of proxies which can be used on this machine to connect to the network.
|
||
71 | | Unless otherwise specified (by system property or command-line switch), the first proxy
|
||
72 | | specification in this list marked as active will be used.
|
||
73 | |-->
|
||
74 | <proxies>
|
||
75 | <!-- proxy
|
||
76 | | Specification for one proxy, to be used in connecting to the network.
|
||
77 | |
|
||
78 | <proxy>
|
||
79 | <id>optional</id>
|
||
80 | <active>true</active>
|
||
81 | <protocol>http</protocol>
|
||
82 | <username>proxyuser</username>
|
||
83 | <password>proxypass</password>
|
||
84 | <host>proxy.host.net</host>
|
||
85 | <port>80</port>
|
||
86 | <nonProxyHosts>local.net,some.host.com</nonProxyHosts>
|
||
87 | </proxy>
|
||
88 | -->
|
||
89 | </proxies>
|
||
90 | |||
91 | <!-- servers
|
||
92 | | This is a list of authentication profiles, keyed by the server-id used within the system.
|
||
93 | | Authentication profiles can be used whenever maven must make a connection to a remote server.
|
||
94 | |-->
|
||
95 | <servers>
|
||
96 | <!-- server
|
||
97 | | Specifies the authentication information to use when connecting to a particular server, identified by
|
||
98 | | a unique name within the system (referred to by the 'id' attribute below).
|
||
99 | |
|
||
100 | | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
|
||
101 | | used together.
|
||
102 | |
|
||
103 | <server>
|
||
104 | <id>deploymentRepo</id>
|
||
105 | <username>repouser</username>
|
||
106 | <password>repopwd</password>
|
||
107 | </server>
|
||
108 | -->
|
||
109 | |||
110 | <!-- Another sample, using keys to authenticate.
|
||
111 | <server>
|
||
112 | <id>siteServer</id>
|
||
113 | <privateKey>/path/to/private/key</privateKey>
|
||
114 | <passphrase>optional; leave empty if not used.</passphrase>
|
||
115 | </server>
|
||
116 | -->
|
||
117 | </servers>
|
||
118 | |||
119 | <!-- mirrors
|
||
120 | | This is a list of mirrors to be used in downloading artifacts from remote repositories.
|
||
121 | |
|
||
122 | | It works like this: a POM may declare a repository to use in resolving certain artifacts.
|
||
123 | | However, this repository may have problems with heavy traffic at times, so people have mirrored
|
||
124 | | it to several places.
|
||
125 | |
|
||
126 | | That repository definition will have a unique id, so we can create a mirror reference for that
|
||
127 | | repository, to be used as an alternate download site. The mirror site will be the preferred
|
||
128 | | server for that repository.
|
||
129 | |-->
|
||
130 | <mirrors>
|
||
131 | <!-- mirror
|
||
132 | | Specifies a repository mirror site to use instead of a given repository. The repository that
|
||
133 | | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
|
||
134 | | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
||
135 | |
|
||
136 | <mirror>
|
||
137 | <id>mirrorId</id>
|
||
138 | <mirrorOf>repositoryId</mirrorOf>
|
||
139 | <name>Human Readable Name for this Mirror.</name>
|
||
140 | <url>http://my.repository.com/repo/path</url>
|
||
141 | </mirror>
|
||
142 | -->
|
||
143 | </mirrors>
|
||
144 | |||
145 | <!-- profiles
|
||
146 | | This is a list of profiles which can be activated in a variety of ways, and which can modify
|
||
147 | | the build process. Profiles provided in the settings.xml are intended to provide local machine-
|
||
148 | | specific paths and repository locations which allow the build to work in the local environment.
|
||
149 | |
|
||
150 | | For example, if you have an integration testing plugin - like cactus - that needs to know where
|
||
151 | | your Tomcat instance is installed, you can provide a variable here such that the variable is
|
||
152 | | dereferenced during the build process to configure the cactus plugin.
|
||
153 | |
|
||
154 | | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
|
||
155 | | section of this document (settings.xml) - will be discussed later. Another way essentially
|
||
156 | | relies on the detection of a system property, either matching a particular value for the property,
|
||
157 | | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
|
||
158 | | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
|
||
159 | | Finally, the list of active profiles can be specified directly from the command line.
|
||
160 | |
|
||
161 | | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
|
||
162 | | repositories, plugin repositories, and free-form properties to be used as configuration
|
||
163 | | variables for plugins in the POM.
|
||
164 | |
|
||
165 | |-->
|
||
166 | <profiles>
|
||
167 | <!-- profile
|
||
168 | | Specifies a set of introductions to the build process, to be activated using one or more of the
|
||
169 | | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
|
||
170 | | or the command line, profiles have to have an ID that is unique.
|
||
171 | |
|
||
172 | | An encouraged best practice for profile identification is to use a consistent naming convention
|
||
173 | | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
|
||
174 | | This will make it more intuitive to understand what the set of introduced profiles is attempting
|
||
175 | | to accomplish, particularly when you only have a list of profile id's for debug.
|
||
176 | |
|
||
177 | | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
|
||
178 | <profile>
|
||
179 | <id>jdk-1.4</id>
|
||
180 | |||
181 | <activation>
|
||
182 | <jdk>1.4</jdk>
|
||
183 | </activation>
|
||
184 | |||
185 | <repositories>
|
||
186 | <repository>
|
||
187 | <id>jdk14</id>
|
||
188 | <name>Repository for JDK 1.4 builds</name>
|
||
189 | <url>http://www.myhost.com/maven/jdk14</url>
|
||
190 | <layout>default</layout>
|
||
191 | <snapshotPolicy>always</snapshotPolicy>
|
||
192 | </repository>
|
||
193 | </repositories>
|
||
194 | </profile>
|
||
195 | -->
|
||
196 | |||
197 | <!--
|
||
198 | | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
|
||
199 | | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
|
||
200 | | might hypothetically look like:
|
||
201 | |
|
||
202 | | ...
|
||
203 | | <plugin>
|
||
204 | | <groupId>org.myco.myplugins</groupId>
|
||
205 | | <artifactId>myplugin</artifactId>
|
||
206 | |
|
||
207 | | <configuration>
|
||
208 | | <tomcatLocation>${tomcatPath}</tomcatLocation>
|
||
209 | | </configuration>
|
||
210 | | </plugin>
|
||
211 | | ...
|
||
212 | |
|
||
213 | | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
|
||
214 | | anything, you could just leave off the <value/> inside the activation-property.
|
||
215 | |
|
||
216 | <profile>
|
||
217 | <id>env-dev</id>
|
||
218 | |||
219 | <activation>
|
||
220 | <property>
|
||
221 | <name>target-env</name>
|
||
222 | <value>dev</value>
|
||
223 | </property>
|
||
224 | </activation>
|
||
225 | |||
226 | <properties>
|
||
227 | <tomcatPath>/path/to/tomcat/instance</tomcatPath>
|
||
228 | </properties>
|
||
229 | </profile>
|
||
230 | -->
|
||
231 | </profiles>
|
||
232 | |||
233 | <!-- activeProfiles
|
||
234 | | List of profiles that are active for all builds.
|
||
235 | |
|
||
236 | <activeProfiles>
|
||
237 | <activeProfile>alwaysActiveProfile</activeProfile>
|
||
238 | <activeProfile>anotherAlwaysActiveProfile</activeProfile>
|
||
239 | </activeProfiles>
|
||
240 | -->
|
||
241 | </settings> |