Maven how to handle multiple projects and settings.xml on one computer

I want to have several (local) settings.xml files on my computer for my maven projects, one per project. What is the best way to handle these .xml parameters (hopefully somehow using version control)? I know that every developer (and CI server) will want to have several different variables in these settings.xml.

I think something like seetings.xml in subversion for each project, to provide a skeleton with some empty fields, so that everyone can copy and paste the settings.xml file to their local directory, where it is picked up by maven, and also fill in empty values ​​that are unique for the environment / user. Keep in mind, I do not mean things that can be set through profiles, it is more like usernames and passwords, etc.

This leaves us with a problem with several settings.xml files. Intellij, as I see it, has a maven configuration for each project, so I should have no problem setting seperete locations for each project. Regarding the command line, do I really need to enter the path to my settings.xml file every time I run something (using the -s command)?

thank

+4
source share

Source: https://habr.com/ru/post/1528870/


All Articles