If the content of the settings.xml
is not that user specific (e.g. for mirrors
), you could store the whole Maven install in SVN with a customized conf/settings.xml
and have the developers grab it from SVN to "install" it on a new machine as described in this previous answer.
If the content of the settings.xml
is really user specific (e.g. it contains secret things like passwords), then it must be located in ~/.m2
and you will have to somehow make it available at the new location. If a developer logs on another machine, you could use "Roaming user profile". If a developer gets another id, then you'll really have to duplicate it. The technical solution may depend on the level of confidentiality required.
And if you have several developers sharing a userid but still need different settings.xml
, then you'll have to pass it to Maven using the -s
option. One could imagine storing these custom settings.xml
in the project in that case (assuming it doesn't contain sensitive information). For example:
mvn -s settings-user1.xml <goal>