Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.m2 , settings.xml in Ubuntu [duplicate]

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.

like image 503
someone Avatar asked Nov 13 '12 09:11

someone


People also ask

Where is m2 settings xml Ubuntu?

It is usually installed in USER_HOME/. m2/ directory. If you do not find a settings. xml file, copy the settings.

Where is Maven settings xml in Ubuntu?

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.

Where is settings XML file in .m2 folder?

The Maven settings file, settings. xml , is usually kept in the . m2 directory inside your home directory.

How do I delete a .m2 folder in Linux?

Just open eclipse-->window-->preferences-->maven-->user settings-->in there see "local repository location". then find the location for your . m2/repository folder then delete that folder if your maven doesn't work properly.


2 Answers

As per 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

like image 109
Thomas Avatar answered Oct 08 '22 17:10

Thomas


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 
like image 32
jens-na Avatar answered Oct 08 '22 17:10

jens-na