On 14 December 2010 08:06, fhomasp <thomas.peet...@realdolmen.com> wrote: > > After reading a bit of the debate I wonder a few things. I read "stay away > from profiles" a lot but I do find them to be very useful. > > So what's the alternative on profiles? Assuming there is a modular project > with several jars, several wars and several ears. Each of those artifacts > can be built for a different environment (development, test (1,2,3), > staging, validation,...)
Here is your issue. The Maven Way is to build one artifact that works in any environment. You don't go building environment specific artifacts on the Maven Way. You use things like JNDI or properties files added to the classpath to provide the environment customisations.... In situations like branding, you produce a brand artifact for each of the customer specific brands and you would load that into your application, by e.g. loading from the classpath, or by installing into the deployed application. If you have an existing application that is not designed this way, then I can see that you might find it hard to avoid profiles.... but you will have a better application if it is designed for the kind of pluggable customizations I describe. The Maven Way is about best practices.... and one of the best practices there is is ensuring that you only build an artifact once and re-use that tested artifact... it reduces the scope of testing (i.e. you only have to test the JNDI names exist, or you only have to test that the branding is correctly applied, rather than have to retest the entire application because you have rebuilt it with the alternate profile. -Stephen > > Then an ear/war can be deployed using Maven to those different environments, > be it from a local machine or Hudson or some other contineous integration > tool. > > How would one automate such situations without profiles and without a huge > amount of redundant maven xml? > > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Reasonable-use-of-profiles-tp3300650p3304188.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org