Instead of profiles could you configure the various plugins in the pluginManagement[1] section of your parent pom(s) and then just enable the plugin in the various project poms?
[1] http://www.sonatype.com/books/maven-book/reference/optimizing-sect-plugi ns.html -----Original Message----- From: Lewis, Eric [mailto:[email protected]] Sent: Monday, August 17, 2009 11:08 AM To: Maven Users List Subject: Centralized build configuration: Improvements in 2.2? Hi We have a standard build, but some modules need special build steps, like JAXB or OSGi stuff etc. In order to stick to DRY (Don't Repeat Yourself), we defined profiles in the parent POM which add the required plugins to the build. So for instance, to build something with JAXB, we call 'mvn clean package -Pjaxb' As nice as this is, it totally breaks as soon as we try to build the whole project with the Maven Reactor. It's not possible just to specify 'mvn clean package' for the top-level POM and to expect the profiles to be called magically. We've tried many things, but with 2.0.9 there wasn't any satisfying solution. Now, before I go into every POM and add build steps by copy & paste: Has this situation become better with Maven 2.2? For instance: - Can I import XML fragments into a POM? - Can I activate profiles by some other means? I remember profile properties file, but I think that didn't work. - Any other or better ideas? Thanks & best regards, Eric --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
