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

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

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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/542418.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

npm 全局安装vuecli报错_cnn explainer本地使用--被npm坑惨

最近在知乎上面看到&#xff0c;看到一个cnn解释器&#xff0c;把每个步揍都很清楚的展示了出来&#xff0c;我想自己搞来玩玩。第一次使用npm&#xff0c;很多地方不会&#xff0c;第一步&#xff1a;先在网页上下载下来cnn_explainer&#xff0c;然后解压在没有中文路径的文件…

Python程序从给定的N个数字中找到最大倍数

Here, we will be framing code for finding the maximum multiple of a number x from a given set of a number (set of 5 numbers in this program). 在这里&#xff0c;我们将使用成帧代码&#xff0c; 从给定的一组数字(此程序中的5个数字组成的集合)中找到x的最大倍数 。…

openmpi安装_Intel Parallel Studio XE 2019安装设置

1.Intel Parallel Studio XE 2019简介Intel Parallel Studio XE 是Intel在单独一款软件开发套件中整合了英特尔公司业界领先的 C/C 和 Fortran 编译器、性能和MPI并行库、错误检查、代码健壮和性能分析的工具&#xff0c;有助于大幅提升应用程序性能&#xff0c;同时提高代码质…

[Android] 开源View组件(一)

Material Design系列&#xff0c;自定义Behavior实现Android知乎首页 仿今日头条最强顶部导航指示器&#xff0c;支持6种模式 MagicIndicator系列之一 —— 使用MagicIndicator打造千变万化的ViewPager指示器 Android 优雅的为RecyclerView添加HeaderView和FooterView Android …

sql server修改字段编码格式_关于MySQL如何修改character_set_client的编码问题

问题引入&#xff1a;我们经常会遇到一些向MySQL数据库中插入中文&#xff0c;但是select出来的时候&#xff0c;却发现是乱码的情况。如我们向表a出入这样一段记录&#xff1a;iinsert into a values(‘你好helloworld你好’,’helloworld’);可能当你访问它的时候&#xff0c…

通用apdu指令_8086微处理器中的通用指令格式

通用apdu指令Introduction: 介绍&#xff1a; In this article, we are going to discuss about the 6 general formats of instructions. 在本文中&#xff0c;我们将讨论6种通用指令格式。 One byte instruction: 一字节指令 &#xff1a; This is only one byte long an…

Win10系统怎样让打开图片方式为照片查看器

打开注册表编辑器之后&#xff0c;我们双击左侧的目录&#xff0c;依次打开HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft目录&#xff0c;如下图所示。 在Microsoft目录下&#xff0c;我们需要找到Windows Photo Viewer\Capabilities\FileAssociations目录项&#xff0c;直到看到该子…

c语言插入排序算法_插入排序算法,流程图和C,C ++代码

c语言插入排序算法In the last article, we discussed about the bubble sort with algorithm, flowchart and code. In this article, we are going to discuss about another basic sorting technique i.e. insertion sort. 在上一篇文章中&#xff0c;我们讨论了用算法&…

EF使用CodeFirst方式生成数据库技巧经验

前言 EF已经发布很久了&#xff0c;也有越来越多的人在使用EF。如果你已经能够非常熟练的使用EF的功能&#xff0c;那么就不需要看了。本文意在将自己使用EF的方式记录下来备忘&#xff0c;也是为了给刚刚入门的同学一些指导。看完此文&#xff0c;你应该就学会以CodeFirst的方…

对象过滤某个属性 循环 php_37道PHP面试题(附答案)

1、什么事面向对象&#xff1f;主要特征是什么&#xff1f;面向对象是程序的一种设计方式&#xff0c;它利于提高程序的重用性&#xff0c;使程序结构更加清晰。主要特征&#xff1a;封装、继承、多态。2、SESSION 与 COOKIE的区别是什么&#xff0c;请从协议&#xff0c;产生的…

oracle   SQL执行过程

1.sql执行过程1>解析&#xff08;判断对象是否存在&#xff0c;是否有权限查询&#xff0c;语义解析&#xff0c;检查缓存中是否有相同的SQL等等&#xff09;2>优化&#xff08;CBO确定优化模式&#xff0c;确定访问路径&#xff0c;联接顺序&#xff0c;过程中通过很多综…

vue-video-player修改src就会报错_4、修改入口点代码

在riscv上电时&#xff0c;会进行CPU自检&#xff0c;然后跳转到bootloader处执行。bootloader设置好kernel的运行环境后&#xff0c;从硬盘加载kernel到内存&#xff0c;最后再跳转到kernel入口地址。我们采用的bootloader为OpenSBI&#xff0c;被加载到0x80000000地址&#x…

社交应用动态九宫格图片的规则

这里主要以微信和QQ空间为作为研究对象&#xff0c;得到的结论如下。 QQ空间里的动态 iOS设备&#xff0c;以iPhone6为分界 iPhone6及以上分辨率的设备&#xff1a; 当宽且高同时 > 512px时&#xff0c;判断 宽/高的比例值&#xff1a;大于 2时&#xff0c;以高度为基准&…

splunk中 如何隐藏input_翻糖制作中,如何避免裂缝,如何隐藏裂缝,如何防粘?...

翻糖蛋糕 因精致的样子和栩栩如生的各种造型深得人们的喜爱&#xff0c;它不仅满足了人们对蛋糕口味及装饰日益多样化的需求&#xff0c;同时也在动手制作的过程中&#xff0c;享受到美食与生活的无穷乐趣。不过裂缝&#xff0c;不平整&#xff0c;干燥对翻糖作品来说无疑是噩梦…

wpf中groupbox有什么用_展示设计中的标摊是什么 用的什么材料

经常听从事展示设计的工作人员说起标摊&#xff0c;那什么是标摊呢&#xff1f;顾名思义&#xff0c;标摊就是通用标准的国际展会摊位的缩写。但是不少人看到干巴巴的词语还是不能理解。那么这篇文章从用途、材料等方面来详细介绍标摊究竟是什么。 标摊的主要材质是什么一般来说…

ActiveX: 如何用.inf和.ocx文件生成cab文件

ActiveX: 如何用.inf和.ocx文件生成cab文件 转载于:https://www.cnblogs.com/time-is-life/p/5977962.html

操作系统中的处理机调度调度_操作系统中的多处理器调度

操作系统中的处理机调度调度多处理器操作系统 (Multiprocessor Operating system) A multiprocessor system consists of several processors which share memory. In the multiprocessor, there is more than one processor in the system. The reason we use multiprocessor …

sed 替换_sed命令批量替换文件内容

“ 开发人员有时会大批量替换文件内容&#xff0c;sed命令是一个很好用的工具。”01—暴力替换方式近期有个临时任务,将系统中所有"帐"替换为"账",那"帐"和"账"有啥区别呢;1、账的部首是贝&#xff1b;帐的部首是巾。2、账是关于货币、…

android 模仿uc标签页,模仿UCweb菜单 - 白羽雕弓 - 博客园

UCWeb的菜单看起来不错&#xff0c;自己想模仿做一个&#xff0c;苦恼一直没有思路google了几天&#xff0c;终于找到一个帖子 http://www.eoeandroid.com/viewthread.php?tid28824按照上面提供的思路实现了1、保留menu按键作用2、用popupwindow作为菜单显示容器3、用GridVie…

android webview 监听js,Android webview与js的数据交互

项目要用到Webview和js交互&#xff0c;查了查以前的项目感觉还是有必要整理下的。简单描述下项目中用到的地方&#xff0c;比如说在web页需要用到登录的地方点击登录跳转到APP原生登录界面去登录&#xff0c;点击web页的拨打电话弹出原生dialog询问是否拨打&#xff0c;点击we…