为什么80%的码农都做不了架构师?>>>   

1、默认本地仓库路径

C:\Users\97449\.m2\repository

2、修改本地仓库路径

打开D:\apache-maven\conf\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: ${user.home}/.m2/repository<localRepository>/path/to/local/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, 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>--></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>--></profiles><!-- activeProfiles| List of profiles that are active for all builds.|<activeProfiles><activeProfile>alwaysActiveProfile</activeProfile><activeProfile>anotherAlwaysActiveProfile</activeProfile></activeProfiles>-->
</settings>

在文档中添加以下标签

<localRepository>D:\localRepository</localRepository>

以上

转载于:https://my.oschina.net/scutzx/blog/756854

【Maven学习笔记(二)】Maven的安装与配置相关推荐

  1. Maven学习总结(二)——Maven项目构建过程练习

    2019独角兽企业重金招聘Python工程师标准>>> Maven学习总结(二)--Maven项目构建过程练习 上一篇只是简单介绍了一下maven入门的一些相关知识,这一篇主要是体验 ...

  2. Boost库学习笔记(一)安装与配置

    Boost库学习笔记(一)安装与配置 1. 获取boost https://www.boost.org/users/history/version_1_79_0.html 任选其一 boost的目录结 ...

  3. Maven学习笔记(二) :Maven的安装与配置

    在Windows上安装Maven:  1.  首先检查安装JDK 通过命令行运行命令:echo %JAVA_HOME%和java  -version,能够查看当前java的安装文件夹及java的版本号 ...

  4. 【Docker学习笔记 二】Docker安装、运行流程与常用命令

    上一篇Blog详细介绍了Docker为什么会出现,是为了解决什么问题而出现:Docker的基本组成部分.架构.本篇Blog就来详细了解下Docker如何安装.卸载以及常用的操作命令有哪些.因为Dock ...

  5. 学习笔记:Windows 下Keras安装和配置指南

    目录: 目录: Windows下Keras安装和配置指南 Keras 框架搭建 安装 本系列参考官方文档官方文档 这就是keras可以参考前篇:这就是keras 学习笔记 Keras:一些基本概念 一 ...

  6. Vue 新手学习笔记:vue-element-admin 之安装,配置及入门开发

    所属专栏: Vue 开发学习进步 说实话都是逼出来的,对于前端没干过ES6都不会的人,vue视频也就看了基础的一些 但没办法,接下来做微服务架构,前端就用 vue,这块你负责....说多了都是泪,脚手 ...

  7. 【nginx学习笔记】1、安装与配置

    目录 一.系统版本 二.安装编译工具及库文件 三.安装 PCRE 四.安装 Nginx 五.启动nginx 六.访问nginx 七.nginx其他命令 一.系统版本 CentOS Linux rele ...

  8. TensorFlow学习笔记(一)安装、配置、基本用法

    1. 安装 用conda install tensorflow 即可,注意,这里的python是3.6. 基于 Anaconda 的安装 Anaconda 是一个集成许多第三方科学计算库的 Pytho ...

  9. GIT学习笔记(git工具安装与配置)

  10. maven学习笔记之IDEA+Maven+Jetty运行一个简单的web项目

    maven学习笔记 一.什么是maven Maven是一个项目管理工具,它包含了一个项目对象模型 (Project Object Model),一组标准集合,一个项目生命周期(Project Life ...

最新文章

  1. 软件测试质量过程检测文档_如何编写实际上有效的质量检查文档
  2. 针对2013年B题碎纸片拼接问题(附件一、附件二)
  3. 工作日志-W1444
  4. 分享Kali Linux 2017年第18周镜像文件
  5. 杜伦大学提出GANomaly:无需负例样本实现异常检测
  6. C语言中的位运算符主要有哪些?逻辑右移与算术右移的区别?
  7. 修改VS2017新建类模板文件添加注释
  8. TF之DD:利用Inception模型+GD算法生成更高质量的Deep Dream高质量图片
  9. Android 5.x Theme 与 ToolBar 实战
  10. char、varchar、binary和varbinary的区别与联系
  11. 第十六周项目3-有相同数字?
  12. 怎么停止skywalking_Skywalking部署常见问题以及注意事项
  13. tankwar的java坦克子弹撞墙_tankwar
  14. 华视读卡器多浏览器插件_翻遍Chrome商店,这9款插件值得安装
  15. 高效实用Kafka-入门介绍
  16. TestNG 框架的运用
  17. 无痕埋点(声明式)(原创)
  18. 电脑关机后键盘灯和风扇还在转的解决方案
  19. [RK3399 Android7.1.2]新增wifibt模块:rtl8822cs驱动以及解决所遇问题
  20. PERCENTILE_CONT

热门文章

  1. 埃斯顿机器人 王杰高_埃斯顿自动化王杰高博士受邀赴韩参加“ROBOT WORLD 2016”等一系列相关活动...
  2. java j2ssh替代jsch,jsch设置ssh协商算法优先级
  3. python 目录下的文件_用python把文件夹下的所有文件包括文件夹里面的文件都拷贝到同一个目录下...
  4. java 随机 数字 字母组合_java生成随机数字和字母组合
  5. mysql的使用优化问题吗_如何对 mysql 进行优化的问题
  6. Oracle 数据库、Microsoft SQL Server、MySQL 数据库三种常见数据库的区别深度剖析
  7. Hibernate学习之hibernate.cfg.xml
  8. HDU 1007Quoit Design(最近点问题)
  9. python修改服务器ip,[python+Bat]读表修改机房IP
  10. mysql常规使用(建立,增删改查,视图索引)