Eclipse: Different Maven settings.xml

Well it happened — a third party project team decided they’d configure a complicated settings.xml file, which resides in the .m2 folder on your local.  But I already have projects that don’t like what they wrote in that file, so I had to create two:

  • settings-common.xml for our projects
  • settings-thirdparty.xml for their projects

Now when I open a workspace, I just configure the Maven plugin in Eclipse to point at the correct settings file:

Of course, to run from the command line you should specify the proper settings file as a parameter:

C:\<pom directory> mvn install --settings c:\User\.m2\settings-common.xml

Comments are closed.