Correct me if I’m wrong but one normally puts deployment or user-specific properties (e.g. development/testserver settings) inside settings.xml. And by specifying which profiles to use, we can change the behaviour of the maven build.
However there are usually settings in the profiles (settings.xml) which should be shared. Since I don’t want to check in settings.xml, I want the maven build to query a database for those profile settings & do the filtering. Is this possible via some plugin ?
Well,
settings.xmlis not the best choice for profiles if you don’t want to make your build non portable. You should actually put profiles in thepom.xmlof your project instead and usesettings.xmlfor “secret” things only. See chapter 11.5. Tips and Tricks of Sonatype’s Maven book. Actually, I’d suggest to read the whole chapter 11. Build Profiles.Well, as I said, putting the profiles in the
pom.xmlshould solve this (and I don’t know if such a plugin exists). An intermediary solution would be to use profiles and filters as described in this blog post but this isn’t much different.