Use maven often need to configure, remote warehouse address, generally do not use the default configuration, after all, the Internet has a great impact
The following is the image configuration of Ali,
1, modify the Maven/conf/settings.xml file, the following code is fully copied in the past can be used,
2, set the custom <localRepository> path,
<?xml version= "1.0" encoding= "UTF-8"?> <!--Licensed to the Apache software Foundation (ASF) under one or more C Ontributor 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 are not a use of this file except in compliance with the License. Obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 unless required by applicable or agreed to writing, software distributed under the License are distributed on a "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. -<!--| The configuration file for Maven.
It can specified at 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 is 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 is overridden with the CLI option: | |
-gs/path/to/global/settings.xml | | The sections in this sample file is 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 isn't 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" > & lt;! --Localrepository |
The path to the local repository maven would use to store artifacts.
| | Default: ${user.home}/.m2/repository <localRepository>/path/to/local/repo</localRepository>-&L t;localrepository>d:/maven_3/maven/m2/repository</localrepository> <!--InteractiveMode | This would determine whether Maven prompts when it needs input. If set to False, | Maven would 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 is a effect on artifact downloads, artifact deployment, and others.
| | Default:false <offline>false</ofFline>-<!--plugingroups |
This was a list of additional group identifiers that would be searched when resolving plugins by their prefix, i.e. | When invoking a command line like "Mvn prefix:goal". Maven would automatically add the group identifiers |
"Org.apache.maven.plugins" and "Org.codehaus.mojo" if these is 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 being used on the the network. | Unless otherwise specified (by system property or command-line switch), the first proxy |
Specification in this list marked as active would be used. |--> <proxies> <!--proxy |
Specification for one proxy, to is used in connecting to the network.
|<proxy> <id>optional</id> <active>true</active> <protocol>http</p rotocol> <username>proxyuser</username> <password>proxypass</password>