在maven settings.xml文件中配置私服信息

<?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 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
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 at| 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>D:\apache-maven-3.0.5\localrepo</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, for| the parameter in question.|| Default: true<interactiveMode>true</interactiveMode>--><!-- offline| Determines whether maven should attempt to connect to the network when executing a build.| This will have an effect on artifact downloads, artifact deployment, and others.|| 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>--><pluginGroup>org.sonarsource.scanner.maven</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</host><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 particular server, identified by| a unique name within the system (referred to by the 'id' attribute below).| | NOTE: You should 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>--><server>    <id>releases</id>    <username>admin</username>    <password>admin123</password>    </server>    <server>    <id>snapshots</id>    <username>admin</username>    <password>admin123</password>    </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 an ID that matches the mirrorOf element of this mirror. IDs are used| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.|<mirror><id>mirrorId</id><mirrorOf>repositoryId</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://my.repository.com/repo/path</url></mirror>--><mirror><!--This sends everything else to /public --> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://192.168.0.101:8081/nexus/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 essentially| relies on the detection of a system property, either matching a particular value for the property,| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a | 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| Specifies a set of introductions to the build process, to be activated using one or more of the| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>| or the command line, profiles have to have an ID that is unique.|| An encouraged best practice for profile identification is to use a consistent naming convention| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.| This will make it more intuitive to understand what the set of introduced profiles is attempting| to accomplish, particularly when you only have a list of profile id's for debug.|| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.<profile><id>jdk-1.4</id><activation><jdk>1.4</jdk></activation><repositories><repository><id>jdk14</id><name>Repository for JDK 1.4 builds</name><url>http://www.myhost.com/maven/jdk14</url><layout>default</layout><snapshotPolicy>always</snapshotPolicy></repository></repositories></profile>--><!--| Here is another profile, activated by the system property 'target-env' with a value of 'dev',| which provides a specific path to the Tomcat instance. To use this, your plugin configuration| might hypothetically look like:|| ...| <plugin>|   <groupId>org.myco.myplugins</groupId>|   <artifactId>myplugin</artifactId>|   |   <configuration>|     <tomcatLocation>${tomcatPath}</tomcatLocation>|   </configuration>| </plugin>| ...|| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to|       anything, you could just leave off the <value/> inside the activation-property.|<profile><id>env-dev</id><activation><property><name>target-env</name><value>dev</value></property></activation><properties><tomcatPath>/path/to/tomcat/instance</tomcatPath></properties></profile>--><profile><id>sonar</id><activation><activeByDefault>true</activeByDefault></activation><properties><!-- Optional URL to server. Default value is http://localhost:9000 --><sonar.host.url>http://10.115.1.84:9000</sonar.host.url></properties></profile><profile><id>nexus</id><!--Enable snapshots for the built in central repo to direct --><!--all requests to nexus via the mirror --><repositories><repository><id>central</id><url>http://192.168.0.101:8081/nexus/content/groups/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository></repositories><pluginRepositories><pluginRepository><id>central</id><url>http://192.168.0.101:8081/nexus/content/groups/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></pluginRepository></pluginRepositories><distributionManagement><repository><id>releases</id><name>Nexus Release Repository</name><url>http://192.168.0.101:8081/nexus/content/repositories/releases/</url></repository><snapshotRepository><id>snapshots</id><name>Nexus Snapshot Repository</name><url>http://192.168.0.101:8081/nexus/content/repositories/snapshots/</url></snapshotRepository></distributionManagement></profile><profile><id>sonar</id><activation><activeByDefault>true</activeByDefault></activation><properties><!-- Optional URL to server. Default value is http://localhost:9000 --><sonar.host.url>http://localhost:9000</sonar.host.url></properties></profile></profiles><!-- activeProfiles| List of profiles that are active for all builds.|<activeProfiles><activeProfile>alwaysActiveProfile</activeProfile><activeProfile>anotherAlwaysActiveProfile</activeProfile></activeProfiles>--><activeProfiles><activeProfile>nexus</activeProfile></activeProfiles></settings>

maven配置私服信息相关推荐

  1. maven配置私服地址(公司私服)记录

    前言 一般公司都会搭建自己的maven私服,用于存放公司的一些开发的jar包,私服搭建一般使用nexus,这个比较简单. 配置 设置本地仓库的jar包存放地址 <localRepository& ...

  2. Maven问题总结及配置私服或公共仓库

    一, Maven概念作用 概念 Maven是一个基于项目对象模型(POM)的概念的纯java开发的开源的项目管理工具. 作用 依赖管理(jar包依赖管理) 项目构建(项目编译.打包.测试.部署). 分 ...

  3. maven配置(安装使用私服)文档

    总括: 在项目中pom配置私服 --项目级别需要认证的远程仓库配置在pom中 <distributionManagement> <repository> <id>n ...

  4. Maven配置nexus私服地址

    一般java开发都会用到nexus私服,这里记录一下maven配置nexus私服地址的步骤 配置全局和本用户下两个setting.xml 镜像地址 一般maven本地用户的配置文件在我的文档目录下.m ...

  5. 配置Maven从私服下载构件

    --------------------siwuxie095 配置 Maven 从私服下载构件 从 Nexus 私服下载构件的配置方法共有三种 1.法一: 在 pom.xml 的 project 标签 ...

  6. maven 配置下载jar、源码等先走私服,找不到再走阿里云镜像

    maven 配置下载jar.源码等先走私服,找不到再走阿里云镜像 如果配置了不起作用请重启Idea <?xml version="1.0" encoding="UT ...

  7. Maven Nexus3 私服搭建、配置、项目发布(docker方式)

    maven nexus私服搭建 访问nexus3官方镜像库,选择需要的版本下载:Docker Nexus docker pull sonatype/nexus3:3.49.0 创建数据目录并赋权 su ...

  8. apache camel 相关配置_Web基础配置篇(二): Maven配置及使用

    Web基础配置篇(二): Maven配置及使用 一.概述 Maven是一个软件开发管理工具,主要管理工作是:依赖管理,项目一键构建. 以前用过ant,很不方便,maven比较简单易用. 然后后面又来了 ...

  9. Maven高级-私服

    Maven高级-私服 6,私服 6.1 私服简介 6.2 私服安装 步骤1:下载解压 步骤2:启动Nexus 步骤3:浏览器访问 步骤4:首次登录重置密码 6.3 私服仓库分类 6.4 本地仓库访问私 ...

  10. Java项目管理工具:maven配置详解

    目录 一.maven概述 二.maven仓库 三.maven工程 最后 今天是刘小爱自学Java的第98天. 感谢你的观看,谢谢你. 话不多说,开始今天的学习: 经过97天的学习,对于JavaSE.数 ...

最新文章

  1. pandas使用loc函数更新、修改dataframe指定数据行的内容(update or change the content of specific row of dataframe)
  2. Oracle 10g Toad查看 表空间 报错 ORA-00600 internal error code arguments [ktfbhget-4], [6], [5]...
  3. 学习计划20190509
  4. 高可用性网络的简单配置方案(一)
  5. Linux ubuntu中怎么生成随机数,随机数的生成
  6. 开发日记-20190601 关键词 读书笔记《鸟哥的Linux私房菜-基础学习篇》
  7. UTC/GMT/CST几种常见的时间概述
  8. c#中Task线程的用法
  9. Oracle取最大/最小值函数
  10. 如何使用UI技术提升租房类APP的看房体验?
  11. 高通在物联网领域已经深耕多年
  12. lucene: 索引建立完后无法查看索引文件中的数据
  13. EasyUI分页加载datagrid时候报错Uncaught TypeError: Cannot read property 'length' of undefined...
  14. Python爬虫-模拟登入-selenium模块
  15. 【洛谷】P2689 东南西北(dfs|贪心)
  16. 【固态硬盘】入门讲解
  17. prgrmz的作品集
  18. Unity3D 如何干净的解除父子关系
  19. 三年级计算机帮助我们学本领,三年级学本领100字作文
  20. Android中级面筋:开发2年的程序员如何短期突击面试?

热门文章

  1. html5中event获取data和class
  2. Jquery 强大的表单验证操作
  3. 罗永浩给俞敏洪的求职信
  4. Java学习:多线程
  5. FastReport.Net使用:[1]屏蔽打印对话框
  6. iOS-Senior19-FMDB第三方应用
  7. 安装Reporting Service即时报表模型
  8. 使用 JavaScript 生成二维码 —— QRCode.js
  9. Eclipse中经常出现的问题解决方案
  10. [BZOJ1594] [Usaco2008 Jan]猜数游戏(二分 + 并查集)