The idea based on profiles in Maven is not the best, because it will force you to run your assembly a couple of times, which means that if you have two environments, you will have to run your assembly twice if you just think about it, Best The solution is to work with Maven-Assembly-Plugin to create a set of artifacts for different environments in one step, which will be different classifier. I made a complete example here .
source
share