We have a Maven project where each developer needs to use their local project settings. Since they should not be stored in the Git repository, we can't speficy them in the pom.xml file.
We have considered to use the ~/.m2/settings.xml file but since this file store properties user-wide and not per project, they interfere with each other. For example:
<profiles>
<profile>
<id>project1</id>
<properties>
<sftp-endpoint>10.201.50.14</sftp-endpoint>
<sftp-password>secretpass</sftp-password>
</properties>
</profile>
<profile>
<id>project2</id>
<properties>
<sftp-endpoint>12.34.56.78</sftp-endpoint>
<sftp-password>pencil</sftp-password>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>project1</activeProfile>
<activeProfile>project2</activeProfile>
</activeProfiles>
If I try to use this file, when I work on project1 I also get local properties from project2. They must have the same names since a lot depend on them.
Is there any way I can have local properties per project in Maven?