Use the maven repository setting configuration of oschina

Source: Internet
Author: User
Tags unique id

<? XML version = "1.0" encoding = "UTF-8"?>

<! --
Licensed to the Apache Software Foundation (ASF) under one
Or more contributor license agreements. See the notice file
Distributed with this work for additional information
Regarding copyright ownership. The ASF licenses this file
To you under the Apache license, version 2.0 (
"License"); you may not use this file except T in compliance
With the license. You may obtain a copy of the license

Http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
Software distributed under the license is distributed on
"As is" basis, without warranties or conditions of any
Kind, either express or implied. See the license for
Specific language governing permissions and limitations
Under the license.
-->

<! --
| This is the configuration file for Maven. It can be specified at two levels:
|
| 1. user level. This settings. xml file provides configuration for a single user,
| And is normally provided in $ {user. Home}/. m2/settings. xml.
|
| Note: This location can be overridden with the CLI option:
|
|-S/path/to/user/settings. xml
|
| 2. Global level. This settings. xml file provides configuration for all Maven
| Users on a machine (assuming they're all using the same Maven
| Installation). It's normally provided in
| $ {Maven. Home}/CONF/settings. xml.
|
| Note: This location can be overridden with the CLI option:
|
|-GS/path/to/global/settings. xml
|
| The sections in this sample file are intended to give you a running start
| Getting the most out of your Maven installation. Where appropriate, the default
| Values (values used when the setting is not specified) are provided.
|
| -->
<Settings xmlns = "http://maven.apache.org/SETTINGS/1.0.0"
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemalocation = "http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<! -- Localrepository
| The path to the local repository MAVEN will use to store artifacts.
|
| Default :~ /. M2/Repository

-->
<Localrepository> E: \ Maven \ repo </localrepository>

<! -- Interactivemode
| This will determine whether Maven prompts you when it needs input. If set to false,
| MAVEN will use a sensible default value, perhaps based on some other setting,
| The parameter in question.
|
| Default: True
<Interactivemode> true </interactivemode>
-->

<! -- Offline
| Determines whether Maven shocould attempt to connect to the network when executing a build.
| This will have an effect on artifact downloads, artifact deployment, and others.
| Localrepository
| Default: false
<Offline> false </offline>
-->

<! -- Plugingroups
| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, I. e.
| When invoking a command line like "MVN Prefix: Goal". MAVEN will automatically add the group identifiers
| "Org. Apache. Maven. plugins" and "org. codehaus. Mojo" if these are not already contained in the list.
| -->
<Plugingroups>
<! -- Plugingroup
| Specifies a further Group Identifier to use for plugin lookup.
<Plugingroup> com. Your. plugins </plugingroup>
-->
</Plugingroups>

<! -- Proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
| Specification in this list marked as active will be used.
| -->
<Proxies>
<! -- Proxy
| Specification for one proxy, to be used in connecting to the network.
|
<Proxy>
<ID> optional </ID>
<Active> true </active>
<Protocol> HTTP </protocol>
<Username> proxyuser </username>
<Password> proxypass </password>
<Host> proxy.host.net <Port> 80 </port>
<Nonproxyhosts> local.net | some.host.com </nonproxyhosts>
</Proxy>
-->
</Proxies>

<! -- Servers
| This is a list of authentication profiles, keyed by the server-ID used within the system.
| Authentication profiles can be used whenever Maven must make a connection to a remote server.
| -->
<Servers>
<! -- Server
| Specifies the authentication information to use when connecting to a participant server, identified
| A unique name within the system (referred to by the 'id' attribute below ).
|
| Note: You shoshould either specify username/password or privatekey/passphrase, since these pairings are
| Used together.
|
<Server>
<ID> deploymentrepo </ID>
<Username> repouser </username>
<Password> repopwd </password>
</Server>
-->

<! -- Another sample, using keys to authenticate.
<Server>
<ID> Siteserver </ID>
<Privatekey>/path/to/private/key </privatekey>
<Passphrase> optional; leave empty if not used. </passphrase>
</Server>
-->
</Servers>

<! -- Mirrors
| This is a list of mirrors to be used in downloading artifacts from remote repositories.
|
| It works like this: A pom may declare a repository to use in resolving certain artifacts.
| However, this repository may have problems with heavy traffic at times, so people have mirrored
| It to several places.
|
| That repository definition will have a unique ID, so we can create a mirror reference for that
| Repository, to be used as an alternate download site. The mirror site will be the preferred
| Server for that repository.
| -->

<Mirrors>
<! -- Mirror | specifies a repository mirror site to use instead of a given
Repository. The repository that | this mirror serves has ID that matches
The mirrorof element of this mirror. IDs are used | for inheritance and direct
Lookup purposes, and must be unique into ss the set of mirrors. | -->
<Mirror>
<ID> nexus-Osc </ID>
<Mirrorof> * </mirrorof>
<Name> nexus OSC </Name>
<URL> http://maven.oschina.net/content/groups/public/ </URL>
</Mirror>
</Mirrors>


<! -- Profiles
| This is a list of profiles which can be activated in a variety of ways, and which can modify
| The build process. profiles provided in the settings. XML are intended to provide local machine-
| Specific paths and repository locations which allow the build to work in the local environment.
|
| For example, if you have an integration testing Plugin-like cactus-that needs to know where
| Your Tomcat instance is installed, you can provide a variable here such that the variable is
| Dereferenced during the build process to configure the cactus plugin.
|
| As noted above, profiles can be activated in a variety of ways. One way-the activeprofiles
| Section of this document (settings. XML)-will be discussed later. Another way essential
| Relies on the detection of a system property, either matching a particle value for the property,
| Or merely testing its existence. profiles can also be activated by JDK version prefix, where
| Value of '1. 4' might activate a profile when the build is executed on a JDK version of '1. 4.2 _ 07 '.
| Finally, the list of active profiles can be specified directly from the command line.
|
| Note: For profiles defined in the settings. XML, you are restricted to specifying only artifact
| Repositories, plugin repositories, and free-form properties to be used as Configuration
| Variables for Plugins in the Pom.
|
| -->
<Profiles>
<Profile>
Jdk-1.7

<Activation>
<JDK> 1.7 </JDK>
</Activation>

<Repositories>
<Repository>
<ID> nexus </ID>
<Name> local private nexus </Name>
<URL> http://maven.oschina.net/content/groups/public/ </URL>
<Releases>
<Enabled> true </enabled>
</Releases>
<Snapshots>
<Enabled> false </enabled>
</Snapshots>
</Repository>
</Repositories>
<Pluginrepositories>
<Pluginrepository>
<ID> nexus </ID>
<Name> local private nexus </Name>
<URL> http://maven.oschina.net/content/groups/public/ </URL>
<Releases>
<Enabled> true </enabled>
</Releases>
<Snapshots>
<Enabled> false </enabled>
</Snapshots>
</Pluginrepository>
</Pluginrepositories>
</Profile>

</Profiles>

<! -- Activeprofiles
| List of profiles that are active for all builds.
|
<Activeprofiles>
<Activeprofile> alwaysactiveprofile </activeprofile>
<Activeprofile> anotheralwaysactiveprofile </activeprofile>
</Activeprofiles>
-->
</Settings>

Use the maven repository setting configuration of oschina

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.