Maven ignores settings.xml

I added the proxy configuration in the settigns.xml file, but it is not used by Maven, I confirmed this by invalidating the settings.xml file. I ran the maven installation command to update the settings and global settings to point to the correct file, but still no luck. I am using maven3.0.4.

+5
source share
10 answers

Try running Maven with the -X option. It should print as part of the debug output that uses the settings file.

Since you already tried it with an invalid file, I'm sure something is wrong with the location of your file.

+6
source

Make sure it is in the correct directory (HOME / .m2 / settings.xml)

: - Maven

, , : https://maven.apache.org/settings.html

+2

, , , :

, . , . maven settings.xml .

+1

, Linux

Ubuntu (, , ) maven: maven maven2. - maven2, , , settings.xml ~/.m2.

,

sudo apt-get purge maven2

sudo apt-get install maven

?

, , -, maven2 - (2.x), maven 3.x maven.

0

. settings.xml USER/.m2. , settings.xml M2_HOME/conf, =)

0

, , settings.xml, . : maven IDE settings.xml .

0

: ?

mvn -o โ€“Dmaven.repo.local=$HOME/.my_m2path/repository clean install --settings $HOME/.my_m2path/settings.xml  Dcheckstyle.skip=true โ€“DskipTests

,

  • -o ( 2, )
  • -Dmaven.repo.local - - ,
  • - $HOME/.my_m2path/settings.xml(, )
0

Eclipse * :

  • โ†’

  • "", " " () " ".

  • " ".

  • Browse. (C:\Users \.m2\settings.xml). , .

  • " "

, Maven "" " " " ".

  • P.S. Eclipse (Neon) Windows 10 x64.
0

. , maven .

For me, rebooting the system solved the problem.

0
source

It's almost silly to say, but it can save some time for someone else: if you are using a new computer, make sure that it displays file extensions. Otherwise, your settings.xml file is probably the "settings.xml.txt" file actually ...

-2
source

All Articles