Maven (vi) MAVEN configuration file

Source: Internet
Author: User
Tags xmlns

If you've used Maven plugins in Eclipse, you'll probably have this experience: Configure the path to the settings.xml file. What does the settings.xml file do, and why should it be configured? As you can see from the file name of Settings.xml, it is the configuration file used to set MAVEN parameters. Also, Settings.xml is the global configuration file for maven. The Pom.xml file is a local configuration for your project. Settings.xml includes similar local warehousing locations, modification of remote warehousing server, authentication information and other configurations.

Settings.xml files typically exist in two locations: Global configuration: ${m2_home}/conf/settings.xml User Configuration: ({user.home}/.m2/settings.xml Note: User Configuration takes precedence over global configuration.) )

Note that the local configuration takes precedence over the global configuration. Configuration priority from high to low:pom.xml> user Settings > Global settings If these files exist at the same time, their contents will be merged when the configuration is applied, and if there is a duplicate configuration, the high priority configuration overrides the low priority level.

<?xml version= "1.0" encoding= "UTF-8"?> <settings xmlns= "http://maven.apache.org/SETTINGS/1.0.0" xmlns:x Si= "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 Modify the location of the local repository, by default in the/My Documents/.m2/repository folder. If I open the following note, the default warehouse is built: E:\test-maven\repo <localRepository>E:\test-maven\repo</localRepository> &lt ;! --Interactivemode If MAVEN needs to interact with the user to get input. If MAVEN needs to interact with the user to get input, it is set to true, and vice versa should be false.
  The default is true. <interactiveMode>true</interactiveMode> <!--offline maven needs to run in offline mode. True if the build system needs to run in offline mode, the default is False.
  This configuration is useful when the build server is unable to connect to the remote repository due to network setup reasons or security factors. <offline>false</offline> <!--plugingroups when the Organization ID (groupId) of the plugin is not explicitly provided, for a list of search plug-in organization IDs (GROUPID). The element contains a list of plugingroup elements, each of which contains an organization ID (GROUPID). MAVEN uses this list when we use a plug-in and do not provide an organization ID (groupId) when the command behaves. By default, the list contains the Org.apache.maVen.plugins and Org.codehaus.mojo. -<pluginGroups> <!--plugingroup <pluginGroup>org.codehaus.mojo</pluginGroup>--

   > </pluginGroups> <!--proxies The list of downloaded images configured for the warehouse list.
     -<proxies> <!--This setting, primarily for library user configurations that do not have direct access to the hub. ID: Flag of the agent active: whether to activate Proxy protocol, host, Port:protocol://host:port proxy username, password: username and password Nonproxy Hosts: Host not required for proxy <proxy> <id>optional</id> <active>true</active> &lt ;p rotocol>http</protocol> <username>proxyuser</username> <password>proxypass</pa ssword> 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.