Search code examples
eclipsemaven-2ubuntu

Why maven settings.xml file is not there?


I installed maven plugin for eclipse and was able to use it only in eclipse. I want to be able to run maven commands from terminal so installed maven as explained in the below link:

http://www.mkyong.com/maven/how-to-install-maven-in-ubuntu/

My questions are

  1. I could not find settings.xml in this path /home/raki/.m2/ -- What should I do for this?
  2. Does the maven installed in the above step affects the maven installed in eclipse? These two mavens work independently or how is that?

Solution

  • settings.xml is not required (and thus not autocreated in ~/.m2 folder) unless you want to change the default settings.

    Standalone maven and the maven in eclipse will use the same local repository (~/.m2 folder). This means if some artifacts/dependencies are downloaded by standalone maven, it will not be again downloaded by maven in eclipse.

    Based on the version of Eclipse that you use, you may have different maven version in eclipse compared to the standalone. It should not matter in most cases.