Maven中setting.xml文件配置

maven配置阿里云镜像,配置settings文件,包含配置阿里云镜像,配置maven私服,配置私服密码 阅读详情
<?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 at

    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 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.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: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  <localRepository>D:\software\maven\maven-local-repository</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>
    -->
  </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>
    -->
  </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>
	<id>alimaven</id>
	<mirrorOf>central</mirrorOf>
	<name>aliyun maven</name>
	<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
	</mirror>

	<!-- 中央仓库1 -->
	<mirror>
	<id>repo1</id>
	<mirrorOf>central</mirrorOf>
	<name>Human Readable Name for this Mirror.</name>
	<url>http://repo1.maven.org/maven2/</url>
	</mirror>

	<!-- 中央仓库2 -->
	<mirror>
	<id>repo2</id>
	<mirrorOf>central</mirrorOf>
	<name>Human Readable Name for this Mirror.</name>
	<url>http://repo2.maven.org/maven2/</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>JDK-1.8</id>       
    <activation>       
        <activeByDefault>true</activeByDefault>       
        <jdk>1.8</jdk>       
    </activation>       
    <properties>       
        <maven.compiler.source>1.8</maven.compiler.source>       
        <maven.compiler.target>1.8</maven.compiler.target>       
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>       
    </properties>       
	</profile>
  </profiles>

  <!-- activeProfiles
   | List of profiles that are active for all builds.
   |
  <activeProfiles>
    <activeProfile>alwaysActiveProfile</activeProfile>
    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
  </activeProfiles>
  -->
</settings>

重要部分:

本地maven仓库地址:(第55行)

<localRepository>D:\software\maven\maven-local-repository</localRepository>

远程maven仓库配置:(第161行)

    <!-- 阿里云仓库 -->
	<mirror>
	<id>alimaven</id>
	<mirrorOf>central</mirrorOf>
	<name>aliyun maven</name>
	<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
	</mirror>

	<!-- 中央仓库1 -->
	<mirror>
	<id>repo1</id>
	<mirrorOf>central</mirrorOf>
	<name>Human Readable Name for this Mirror.</name>
	<url>http://repo1.maven.org/maven2/</url>
	</mirror>

	<!-- 中央仓库2 -->
	<mirror>
	<id>repo2</id>
	<mirrorOf>central</mirrorOf>
	<name>Human Readable Name for this Mirror.</name>
	<url>http://repo2.maven.org/maven2/</url>
	</mirror>
  </mirrors>

编译的JDK版本编译:(第207行)

  <profiles>
	<profile>     
    <id>JDK-1.8</id>       
    <activation>       
        <activeByDefault>true</activeByDefault>       
        <jdk>1.8</jdk>       
    </activation>       
    <properties>       
        <maven.compiler.source>1.8</maven.compiler.source>       
        <maven.compiler.target>1.8</maven.compiler.target>       
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>       
    </properties>       
	</profile>
  </profiles>
配置好的阿里云仓库地址的maven setting 立即下载

相关推荐

maven阿里云代理仓库(镜像)setting文件

maven打包setting.xml配置,链接阿里云代理仓库、阿里云镜像,可下载公网jar包,省心使用

maven配置

本文链接:https://blog.csdn.net/huo920/article/details/82082403 本文仅展示setting.xml配置信息,如需看完整版,请移步上述链接处,感谢huo920! <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Found...

qq_38898109的博客 377

DEM高程数据的获取、合并与坐标转换

DEM高程数据的获取、合并与坐标转换一、DEM数据的获取二、数据合并三、投影转换方法一四、投影转换方法二 今天用DEM数据做了一个坡度分析,数据使用过程中涉及到投影坐标转换,由于不是很熟悉所以费了一番功夫。经过一番折腾总结出两个方法,方法一自认为比较便捷的方法,即通过BIGMAP软件中工具列表中的投影转换功能进行。方法二为传统方法,即在Arcgis中用投影栅格工具进行转换。 一、DEM数据的获取 在地理空间数据云网站下载DEM数据(精度包括30米和90米),数据格式为tif格式或img格式,坐标为WGS_1

weixin_48625651的博客 1万+

maven setting.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 wor...

qq_31238839的博客 1470

一、数学建模层次分析法(AHP)【清风数学建模个人笔记】

层次分析法: 层次分析法主要用于解决评价类问题(例如:选择哪种方案更好、哪位员工、运动员等表现得更优秀) 评价类问题: 分析问题得出评判问题的子标,分别给不同子标赋予权重(权重和要为1) ...

m0_58882109的博客 1万+

Innovus ECO技巧:用setEcoMode+ecoAddRepeater实现批量buffer替换的5个关键步骤

本文详细介绍了在Cadence Innovus工具中,利用setEcoMode与ecoAddRepeater命令实现高效、批量Buffer/Inverter替换的工程化策略。通过启用批处理模式、构建可维护的替换规则、掌握高级定位技巧以及规避布线陷阱等5个关键步骤,帮助芯片设计工程师在ECO阶段大幅提升修改效率与质量,确保设计稳定签核。

d6e7f8的博客 1122

Maven之pom.xml与setting.xml配置文件详解

本文系统介绍了Maven的核心配置与使用,主要包括: Maven常用命令:如编译、测试、打包等,以及跳过测试、指定端口等参数设置; POM文件配置详解:包括基本配置、依赖管理、构建配置、环境设置等模块; settings.xml配置:涵盖本地仓库设置、镜像配置、服务器认证、profile管理等; 实用技巧:如处理依赖冲突、版本升级、本地仓库文件管理、引入本地jar包等。 文章还对比了POM与settings配置的优先级,并详细说明了仓库、镜像、profile等核心概念的使用场景和配置方法,为Maven项目的

晨港飞燕的专栏 2万+

CSP-J第一道模拟题——贪心的小朋友

第一行是一个整数 n,表示糖果的堆数 第二行是由空格分隔的 n 个正整数,即数组 candies,表示每堆糖果的数量。后一个离场的小朋友所拿的糖果总堆数必须小于前一个小朋友(对第一个小朋友没有限制)后一个离场的小朋友所拿的糖果总量必须小于前一个小朋友(对第一个小朋友没有限制)这道题目很简单,但是必须删去无用的部分,看清题目,才能得分哦!输出一行共一个整数,表示最多可能有多少个小朋友吃上了美味的糖果。输出最多可能有多少个小朋友吃上了美味的糖果。离场之后的小朋友才能吃上美味的糖果。每个小朋友可以拿多堆糖果。

weixin_29959235的博客 640

maven的setting.xml文件配置

1、找到conf–>setting.xml,右击打开 2、配置本地仓库路径(默认路径为C盘下,尽量不放C盘,之后用到的依赖包非常多,所以修改路径) (1)查找"localRepository" (2)添加本地仓库路径,根据自己需求添加,格式为: D:\JAVA\localRepostitory 3、配置国内镜像,配置如下: alimaven central aliyun ma...

qq_41566042的博客 3854

GEE土地分类:一文读懂精度评定—混淆矩阵confusion matrix、整体精度OA、用户者精度、生产者精度、kappa系数和F1score系数含案例

本文介绍了如何在 Google Earth Engine (GEE) 中构建和分析混淆矩阵,以评估分类模型的性能。首先,通过 ee.Array 构建混淆矩阵,并展示了如何指定自定义类标签。接着,计算了多种性能指标,包括准确率、Kappa 值、F1-score、消费者准确率和生产者准确率。此外,还演示了如何计算不同类别的 F1-score。最后,通过一个实际案例,展示了如何利用 GEE 进行土地分类,并评估分类器的性能,包括训练和验证样本的准确率、Kappa 值等指标。这些步骤帮助用户理解模型的优缺点,并进行

此星光明博客 444

26届数字IC秋招笔试面试全攻略-UVM验证方法学精要

本文介绍了数字IC验证中UVM方法学的核心内容,包括组件架构、Sequence机制和寄存器模型。UVM提供env、agent、driver等组件构建验证环境;Sequence机制通过item、sequence和sequencer实现激励生成与控制;寄存器模型则通过reg_block、reg等组件管理DUT寄存器。文章详细说明了各模块的功能、交互关系和代码实现,为IC验证工程师提供了完整的UVM应用指南,重点突出了验证环境的搭建方法、激励生成流程和寄存器抽象技术。这些内容是数字IC秋招笔试面试中的高频考点。

2301_79143213的博客 725

Maven中完整的setting.xml文件,即配置详情

一、配置本地仓库 <!--设置本地仓库路径--> <localRepository>D:\java\maven\localRepository</localRepository> 二、配置阿里云私服(或换成自己公司搭建的私服) <!-- 在mirrors标签里添加mirror标签,并指定阿里云私服下载依赖会快点 --> <mirror> <id>alimaven</id> <name>aliyu

yang_yzl11的博客 7万+

基于嵌入式Linux设计的智能车库(GEC6818)

随着城市化进程的加快,传统停车管理方式存在效率低下、人工成本高、车主体验差等问题。为解决这些问题,本项目基于嵌入式Linux技术,设计并实现了一套智能车库管理系统。该系统采用GEC6818开发板作为核心控制器,运行Qt应用程序,并结合USB免驱摄像头进行车牌识别,RFID模块完成刷卡支付,SQLite数据库存储车主信息和停车记录。系统提供车主注册、用户管理、出入库管理、停车费结算、车辆查询等功能,并具备语音播报提示,提高用户体验。通过本系统,停车场管理更加高效、智能,有助于提升停车服务质量,减少人工干预,适

447

maven配置文件setting.xml、pom.xml

maven项目配置文件maven项目主要的配置文件有setting.xml、pom.xml两个、setting.xml配置maven自身的一些设置,全局性的配置,,如maven仓库地址等。pom.xml配置项目中的一些设置,如项目所需的jar包等。下文以setting为例详解文档内容。setting.xml文档详解 setting.xml可能存储路径: Maven安装路径: ${maven.hom

1006346386@qq.com 758

BP神经网络回归预测+SHAP可解释分析+新数据预测(MATLAB完整源码)

BP神经网络回归预测+SHAP可解释分析+新数据预测(MATLAB完整源码)

机器学习之心的博客,关注并私信文章链接,获取对应文章源码和数据。 393

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

maven的setting.xml文件配置详解

1 首先,setting.xml一般存在与两个地方:maven的anzhau

stypace的专栏 4万+

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

idea设置maven配置文件setting.xml的位置

 

风情 11万+

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

Maven配置文件setting.xml详解

注:本文来源于:大话JAVA的那些事 《Maven配置文件setting.xml详解》<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta...

weixin_30919571的博客 122

maven配置setting.xml文件、POM.xml详解

1 maven配置setting.xml文件 2

HarryChenj的专栏 5万+

阿里云 maven中央仓库 setting.xml文件配置

阿里云maven中央仓库,下载速度快,这就是我们为什么要用阿里云仓库的原因,请新建一个setting.xml文件,然后拷贝进去,用idea 配置项目地址就可以了。 <?xml version="1.0" encoding="UTF-8"?> <settings> <localRepository>C:\Users\zhang\.m2\repository</localRepository><!--这里配置自己的maven仓库地址--> ...

cx19910829的专栏 6024

IDEA设置maven仓库和setting.xml配置文件

IDEA设置maven仓库和setting.xml配置文件

xiexie0705的博客 1147

IntelliJ IDEA 2021设置maven配置文件setting.xml的位置

原文链接 idea设置maven配置文件setting.xml的位置(IntelliJ IDEA 2021.2 (Ultimate Edition)) 第一步选择File–>Settings…打开Setting对话框。 第二步展开Build, Execution, Deployment–>Build Tolls–>Maven

6924
上一篇: 国庆复习计划
下一篇: 一个好用的截图工具
至学者
博客等级 码龄9年 180粉丝 773原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值