Maven – Settings Reference |
您所在的位置:网站首页 › maven-metadataxml › Maven – Settings Reference |
Quick Overview
The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information. There are two locations where a settings.xml file may live: The Maven install: ${maven.home}/conf/settings.xml A user's install: ${user.home}/.m2/settings.xmlThe former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant. Tip: If you need to create user-specific settings from scratch, it's easiest to copy the global settings from your Maven installation to your ${user.home}/.m2 directory. Maven's default settings.xml is a template with comments and examples so you can quickly tweak it to match your needs. Here is an overview of the top elements under settings: The contents of the settings.xml can be interpolated using the following expressions: ${user.home} and all other system properties (since Maven 3.0) ${env.HOME} etc. for environment variablesNote that properties defined in profiles within the settings.xml cannot be used for interpolation. |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |