Hola!
Pre conditions: I have a number of similar projects, i.e. a number of maven
plugins are identically configured. I have solved this by putting all (most)
plugins in a super-project (pom-packaging), partly in a profile, partly in
pluginManagement:
<project>
<artifactId>super</artifactId>
<packaging>pom</packaging>
<profiles>
<profile>
<id>generatesources</id>
<build>
<plugins>
...
</plugins>
...
<build>
<pluginManagement>
<plugins>
<plugin>
plugin_1 definition and its
configuration
</plugins>
...
</project>
<project>
<parent>
<artifactId>super</artifactId>
...
<artifactId>child_1</artifactId>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
plugin_1 definition and NO config
</plugins>
...
</project>
Everything is working fine if I, when I execute the child_1-project,
activate the profile "generatesources":
~/dev/child_1$>mvn install -P generatesources
BUT to be able to sell the concept of Maven to the organisation I think one
should not need to activate profiles as default, but rather like
"-Dmaven.test.skip=true" and "-o" DEACTIVATE features. One way to achieve
this would be:
<project>
<artifactId>super</artifactId>
<profiles>
<profile>
<id>generatesources</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
...
The problem occurs when I build the super-project and the profile is active,
i.e. tries to act on stuff not present in the super-project. In Maven 2.0.10
there is apparently a flag "!" to be used to inactivate profiles:
~/dev/super$>mvn install -P !generatesources
but how to achieve this (or like the subject of this message implies) before
2.0.10 is released?
regards
-Martin
--
View this message in context:
http://www.nabble.com/inactivate-don%27t-run-plugins-in-pom-packaging-super-projects-tp19990522p19990522.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]