【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.pswp.cn/news/542418.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/542418.shtml
英文地址,請注明出處:http://en.pswp.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的最大倍數 。…

ubuntu linux本地源,如何制作UbuntuLinux操作系統的本地源?

最簡單制作本地源的方法&#xff1a;在packs文件夾中有如下兩種類型的包&#xff1a;一種是。deb包(全部的依賴包和軟件包)&#xff0c;另一種是Packages。gz著重介紹一下第二個類型的包&#xff1a;在這個包中包含了必需的軟件包列表和依賴信息。這個包是后生成的&#xff0c;…

openmpi安裝_Intel Parallel Studio XE 2019安裝設置

1.Intel Parallel Studio XE 2019簡介Intel Parallel Studio XE 是Intel在單獨一款軟件開發套件中整合了英特爾公司業界領先的 C/C 和 Fortran 編譯器、性能和MPI并行庫、錯誤檢查、代碼健壯和性能分析的工具&#xff0c;有助于大幅提升應用程序性能&#xff0c;同時提高代碼質…

Python | 在列表中指定索引處添加元素的程序

Given a list and we have to add an element at specified index in Python. 給定一個列表&#xff0c;我們必須在Python中的指定索引處添加一個元素。 list.appened() Method is used to append/add an element at the end of the list. But, if we want to add an element …

Linux九大哲學原理,Linux/Unix設計思想(全新闡釋開源哲學,Jon “maddog” Hall作序推薦)...

《Linux/Unix設計思想》第1章  Unix哲學&#xff1a;集思廣益的智慧    11.1  NIH綜合征    21.2  Unix的開發    21.3  Linux&#xff1a;一個人加上一百萬人的智慧    41.4  Unix哲學概述    5第2章  人類的一小步    92.1  準則1&#xff1a;小即是美  …

[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…

Linux中斷不能進行任務調度,關中斷是否禁止任務調度?關中斷能作為互斥嗎?...

今天再看《嵌入式軟件系統教程》((美)西蒙 著&#xff0c;陳向群 等譯) &#xff0c;里面講到關中斷會關了任務調度&#xff0c;作者沒說原因&#xff0c;我也不知道為什么&#xff0c;所以查了查網絡。在這個網址http://www.hqwic.com/bbs/topic.aspx?topicid11253上有一個討…

Win10系統怎樣讓打開圖片方式為照片查看器

打開注冊表編輯器之后&#xff0c;我們雙擊左側的目錄&#xff0c;依次打開HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft目錄&#xff0c;如下圖所示。 在Microsoft目錄下&#xff0c;我們需要找到Windows Photo Viewer\Capabilities\FileAssociations目錄項&#xff0c;直到看到該子…

python爬蟲開發 從入門到實戰 pdf 謝乾坤_python字符串和整數相互轉換的實例分享...

python 字符串和整數的轉換方法數字轉成字符串方法一&#xff1a;使用格式化字符串:tt322tem%d %tttem即為tt轉換成的字符串常用的格式化字符串&#xff1a;%d 整數%f%F 浮點數%e%E 科學計數%g%G e 和%f/%E 和%F 的簡寫%% 輸出%格式化操作符輔助指令符號 作用* 定義寬度或者小數…

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的方…

java jar包示例_Java包getImplementationVersion()方法和示例

java jar包示例包類的getImplementationVersion()方法 (Package Class getImplementationVersion() method) getImplementationVersion() method is available in java.lang package. getImplementationVersion()方法在java.lang包中可用。 getImplementationVersion() method …

c語言中字母的定義,c語言字符串定義與初始化 - 且聽風吟

字符串的兩種定義方式char數組char sa[] “hello world”;char指針char *sp “hello world”;這兩種方式都產生了一個”hello world”的字符串常量,字符串常量存儲在靜態存儲區中&#xff0c;靜態存儲區中的內容在程序運行的整個過程中都存在&#xff0c;而且只存儲一份。數組…

python計算兩字符串中的位置_python – 計算兩個字符串之間距離的算法

是否有任何字符串距離算法沒有考慮到單詞的順序&#xff1f;以下算法未提供所需結果(在該示例中,所需結果應為1)&#xff1a;import jarojaro.jaro_winkler_metric(uMichael Jordan,uJordan Michael)>>>0.47import LevenshteinLevenshtein.ratio(Michael Jordan,Jorda…

php unset函數_PHP | 使用unset()函數從數組中刪除元素

php unset函數Given an array and we have to remove an element from the array. 給定一個數組&#xff0c;我們必須從數組中刪除一個元素。 unset()函數 (unset() function) To remove an element from an array, we can use a PHP library unset() function, it accepts th…

vi顯示行號

vi顯示行號 :set nu 帶行號查看&#xff0c;并不改變文件內容:set nonu 取消帶行號查看在每個用戶的主目錄下,都有一個 vi 的配置文件".vimrc"或".exrc"用戶可以編輯它,使這些設置在每次啟動 vi 時,都有效.例如,加入如下設置行:set nu 顯示行號…

對象過濾某個屬性 循環 php_37道PHP面試題(附答案)

1、什么事面向對象&#xff1f;主要特征是什么&#xff1f;面向對象是程序的一種設計方式&#xff0c;它利于提高程序的重用性&#xff0c;使程序結構更加清晰。主要特征&#xff1a;封裝、繼承、多態。2、SESSION 與 COOKIE的區別是什么&#xff0c;請從協議&#xff0c;產生的…