Hello, Being a avid Maven user for years, I have been drilled to avoid using or minimize profiles usage in a Maven build. Even more when it is geared to adapt for a runtime context. I always managed to find a way to convice people to do otherwise until now ...
A solution was provided, via Maven profiles, to support different type of build geared to use or not shared libraries for our web applications and our different types of web application servers. Since the basic use case does not require changing the type of build once the archetype is generated, I suggested to do it via templating in the in house archetypes, thus avoiding bloated pom.xml files and scoping the profile use to environment configuration. Other possibilities would be to have completely seperated achetypes, but I think the templating can cover most of our usecases. I got redirected to this link: http://maven.apache.org/guides/introduction/introduction-to-profiles.html Which kind of states the use of profiles for something very similar to what I am trying to prevent. I have looked at the Maven Reference guide, but have not found other literature that could tip the scale. I don't want to end up in a philosophical argument either, so I want to keep thing constructive. Questions : Are there other, more elegant solution that I could propose ? Am I on the right track in my suggestion to use our in-hous archetypes to do the heavy lifting ? Is there 'official' documentation that I could use as references or best practices to try to avoid that kind of profile abuse (or point me in the proper direction if I am wrong to argue) ? Thanks in advance for all the help Patrick In theory, there is no difference between theory and practice, but in practice, there is ...