Maven command to determine which settings.xml file Maven is using

前端 未结 6 1861
余生分开走
余生分开走 2020-11-30 16:54

How do I use maven command line to determine which settings.xml file Maven is picking up?

6条回答
  •  孤城傲影
    2020-11-30 17:38

    The M2_HOME environment variable for the global one. See Settings Reference:

    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: $M2_HOME/conf/settings.xml
    • A user's install: ${user.home}/.m2/settings.xml

提交回复
热议问题