> I am new to maven, based on the documentation and the specification it seems > like profiles are used to create different versions of a deployment package. > Why would profiles be there if not for that purpose?
Opinions have changed on this point through the years. Maven is opinionated software. Modern QA best practices demand that the development team deliver an artifact to QA and that same unchanged artifact is then delivered to UAT and Production. By creating environment- or server-specific artifacts, you are introducing the possibility of errors into this process. There is a chance that Maven did something wrong (javac failed, bits got flipped in your ram since you're not using ECC, etc) when constructing the PROD artifact but built DEV and QA just fine. You would have no idea that you are about to deploy a horribly corrupted artifact to PROD until it was done and your "five nines SLA" is suddenly in trouble. This defeats the entire purpose of QA. > Maven is suppose to be a build tool, but you are telling me I shouldn't put > build configuration data in it. It seems like you guys are saying only to > use the dependency management/repository aspect of it. Build configuration -- yes. Server-specific runtime configuration which locks a particular artifact so it only runs without modifications in one environment -- no. Some people include "all" runtime configurations in one package and then use a variety of techniques to tell their code which configuration to load at runtime. There are other ways of doing the same general thing, you are free to pick one which seems the most reasonable to you. Profiles for this purpose are nearly always the WRONG answer. Make your build work WITHOUT profiles. Wayne --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
