[macos] Where is Maven's settings.xml located on Mac OS?

Where is Maven's settings.xml located on Mac OS?

This question is related to macos repository maven-2

The answer is


If you use brew to install maven, then the settings file should be in

/usr/local/Cellar/maven/<version>/libexec/conf


found it under /Users/username/apache-maven-3.3.9/conf


I found it under /usr/share/java/maven-3.0.3/conf , 10.8.2


After I have downloaded the binary from apache site I, have placed the extracted folder in /Library
So now the location of the settings.xml file is in:

/Library/apache_maven_3.6.3/conf

I installed mavaen using sdkman because of which the other proposed solution didn't work, as they are applicable if the installation is done via Homebrew or as a standalone binary.

for my solution I did "which mvn" in the terminal which returned: "/Users/samkaz/.sdkman/candidates/maven/current/bin/mvn"

Then after opening the path in a finder and looking around the above directory I found settings.xml in the below folder. "/Users/samkaz/.sdkman/candidates/maven/3.6.3/conf"


->It is located in $MAVEN_HOME/conf/settings.xml... where $MAVEN_HOME is your environmental variable of Maven that you have downloaded. Else you can do like this also.. ->Path to Maven can also be found from /etc/bashrc file in mac. Get Path to Maven from that file and in that Maven directory you can find conf/ directory inside that directory you can find settings.xml of maven


It doesn't exist at first. You have to create it in your home folder, /Users/usename/.m2/ (or ~/.m2)

For example :

alt text


I brew installed it, and found it under /usr/local/apache-maven-3.3.3/conf


if you install the maven with the brew

you can type the command("mvn -v") in Terminal

see Maven home detail

mvn -v
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.5", arch: "x86_64", family: "mac"

Examples related to macos

Problems with installation of Google App Engine SDK for php in OS X dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac Could not install packages due to an EnvironmentError: [Errno 13] How do I install Java on Mac OSX allowing version switching? Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Can't compile C program on a Mac after upgrade to Mojave You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user) How can I install a previous version of Python 3 in macOS using homebrew? Could not install packages due to a "Environment error :[error 13]: permission denied : 'usr/local/bin/f2py'"

Examples related to repository

Kubernetes Pod fails with CrashLoopBackOff Project vs Repository in GitHub How to manually deploy artifacts in Nexus Repository Manager OSS 3 How to return a custom object from a Spring Data JPA GROUP BY query How do I force Maven to use my local repository rather than going out to remote repos to retrieve artifacts? How do I rename both a Git local and remote branch name? Can't Autowire @Repository annotated interface in Spring Boot How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning? git repo says it's up-to-date after pull but files are not updated Transfer git repositories from GitLab to GitHub - can we, how to and pitfalls (if any)?

Examples related to maven-2

Maven:Non-resolvable parent POM and 'parent.relativePath' points at wrong local POM Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project. Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved Maven Error: Could not find or load main class MAVEN_HOME, MVN_HOME or M2_HOME Where is my m2 folder on Mac OS X Mavericks Maven won't run my Project : Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 'mvn' is not recognized as an internal or external command, operable program or batch file SLF4J: Class path contains multiple SLF4J bindings Create local maven repository