.m2 , settings.xml in Ubuntu
JavaLinuxMavenUbuntupom.xmlJava Problem Overview
In the windows environment you will have .m2 folder in C:\Users\user_name location and you will copy your settings.xml file to it in order to setup your proxy settings and nexus repository locations and etc.
So What I have to done on Ubuntu environment to get similar setup after installing maven on it.
Java Solutions
Solution 1 - Java
As per https://stackoverflow.com/questions/5312350/where-is-maven-installed-on-ubuntu it will first create your settings.xml on /usr/share/maven2/, then you can copy to your home folder as jens mentioned
> $ cp /usr/share/maven3/conf/settings.xml ~/.m2/settings.xml
Solution 2 - Java
You can find your maven files here:
cd ~/.m2
Probably you need to copy settings.xml in your .m2
folder:
cp /usr/local/bin/apache-maven-2.2.1/conf/settings.xml .m2/
If no .m2 folder exists:
mkdir -p ~/.m2
Solution 3 - Java
.m2 directory on linux box usually would be $HOME/.m2
you could get the $HOME :
echo $HOME
or simply:
cd <enter>
to go to your home directory.
other information from maven site: http://maven.apache.org/download.html#Installation
Solution 4 - Java
Quoted from http://maven.apache.org/settings.html:
> 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
So, usually for a specific user you edit
/home/*username*/.m2/settings.xml
To set environment for all local users, you might think about changing the first path.