zoukankan      html  css  js  c++  java
  • 使用Maven,正确配置settings.xml配置文件

    先贴一下Maven官网关于settings.xml配置文件的使用说明:

    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.xml

    The 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.

    Maven安装目录的settings.xml,是提供作为模版供用户使用的

    Maven安装目录的settings.xml,是全局级别的配置

    用户指定的settings.xml,是用户级别的配置

    如果这两个级别的配置文件,都做了配置。Maven会把两个配置文件的配置内容合并,并以优先使用用户级别的配置。

    日常使用Maven时,全局配置---Maven安装目录的settings.xml,建议不要做具体配置,按照maven官方文档传达的精神,当作模版使用。使用用户级别的配置文件做配置就好了。

  • 相关阅读:
    团队项目启动及成员分工
    图书馆 管理系统--可行性报告
    KING小组
    什么是F#
    都删了,走了
    机器学习-决策树
    深度学习--说一说卷积和池化
    机器学习--逻辑回归_LR(内附细说极大似然估计,梯度下降法)
    Dlib安装(Mac版)
    动态语言、静态语言及动态语言的“鸭子类型“
  • 原文地址:https://www.cnblogs.com/kevinsteve/p/11799197.html
Copyright © 2011-2022 走看看