Any of those help Maven profiles would provide a build-time solution, while SpringFramework profiles would provide a runtime alternative. I think this is the first question one may ask himself: if he wants to have a single package that can be deployed in different environments, or if he wants the build tool to provide different packages according to the destination environment. One thing to keep in mind is that many questions may arise if you have different packages deployed into different servers. In my workplace, for example, if I am deploying a package to correct a bug previously occurred in production environment, a company policy would state that the only acceptable scenario is that I have the same solution package in QA and in production servers.
Differ database library names (artifacts) for various maven profiles (jboss,tomcat,glassfish) in Maven, Artifactory and
I think the issue was by ths following , Maven profiles to the rescue. On the producing side you need to set different classifiers based on profile. On the consuming side you need to define different dependencies based on the profile. In Jenkins you'll run the correct profile by specifing -p in "Goals and options" textfield in job configuration.
How to set spring active profiles with maven profiles