I have to different log4j.xml and property files which are to be used in Dev and Production. I am using maven for building and packaging. Is there a way I can let maven choose dev or prod by a configurable maven property in POM or passing a run time variable?
Thanks, Abi
The idea based on profiles in Maven is not the best, cause that would force you to run your build a couple of times which means if you have two environments you have to run your build twice if you have more just think about this. The best solution is to work with the Maven-Assembly-Plugin to create a set of artifacts for the different environments in a single step which will be distinct by the classifier. I have made a complete example here.