Some plugins already provide the following 2 properties * skip * forceMojoExecution
The idea is that those plugins must not get executed when the project is of type 'pom'. But since most of this plugins in bigger projects get defined in a 'backend-parent' module (or kind of) which is the parent of all backend modules, it's pretty hard otherwise. Example being the sql-maven-plugin [1], the openjpa-maven-plugin, etc We have been discussing about generalizing this approach, but we would need a bit brainstorming still as there are mojos which explicitely gets executed on the parent pom (also). Generalized I'd say there are 3 types of plugins: a.) sql-maven-plugin like only need to get executed in projects with packaging != pom b.) aggregator mojos (like javadoc-aggregated) which run _only_ on the parent pom c.) mojos which need to get executed in every project (like the site-plugin) LieGrue, strub [1] http://mojo.codehaus.org/sql-maven-plugin/execute-mojo.html ----- Original Message ----- > From: Dirk Olmes <[email protected]> > To: Maven Users List <[email protected]> > Cc: > Sent: Wednesday, October 19, 2011 7:55 PM > Subject: Re: writing a parent pom that does not execute its plugins > > Am 18.10.2011 um 14:41 schrieb Anders Hammar <[email protected]>: > >> Today, activating a profile defined in a parent from the child is not > possible. > > I was able to make the profile idea work in the end. The trick is the > enablement: the parent module defines a profile that is enabled through a > property. The child module defines that property. Works like a charm. > > More details here: > http://xanthippe.dyndns.org/blog/index.php?/archives/33-Templating-Maven-plugin-configurations.html > > -dirk > --------------------------------------------------------------------- > 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]
