maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Kuthan <marcin.kut...@gmail.com>
Subject Re: Execution of plugin in child poms and not in current pom
Date Thu, 04 Aug 2011 18:25:23 GMT
Hi Conny

Define enforcer rules in the profile, e.g:

 <profile>
                        <id>enforcer-rules</id>
                        <activation>
                                <!-- To disable profile, define
property -Dacme-corporate-pom.enforcerRulesDisabled=true -->
                                <property>

<name>!acme-corporate-pom.enforcerRulesDisabled</name>
                                </property>
                        </activation>

...
</profile>

When you build corporate pom, disable the profile with:

mvn -Dacme-corporate-pom.enforcerRulesDisabled=true ....

For all other projects the profile is enabled by default.

--
Marcin Kuthan
Maven For Enterprise - http://code.google.com/p/m4enterprise/


On 4 August 2011 15:47, Krey├čel, Conny <Conny.Kreyssel@inter-forum.de> wrote:
> Hello,
>
> i try to create a "company parent pom" that defines the usage of the enforcer plugin
with some handmade enforcer rules. This rules validates the project settings for all our applications
we build with maven.
>
> My problem is that the enforcer plugin (and the defined rules) are called in the run
of the "company parent pom" build and fail the build because he use the rules that should
only be used in application projects.
>
> Do anyone know how if i can fix this? The enforcer plugin should only called in all projects
based on "company parent pom" as parent.
>
> Thanks.
>
> Conny
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message