Re: Enforcer requirePropertyDiverges not propagated to descendants?

2017-03-04 Thread Hervé BOUTEMY
first, you'll have to talk about rules, not only the plugin: there are many 
rules, some implemented by the plugin and some implemented by MojoHaus extra-
enforcer-rules

then: MojoHaus requirePropertyDiverges [1] requires that the property value is 
different, not that it is not empty

IIUC what you're trying to do, you'll need both Maven requireProperty [2] and 
MojoHaus requirePropertyDiverge [1]

Regards,

Hervé

[1] http://www.mojohaus.org/extra-enforcer-rules/requirePropertyDiverges.html

[2] http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html

Le samedi 4 mars 2017, 21:00:03 CET org.apache.maven.u...@io7m.com a écrit :
> Hello.
> 
> I'm trying to use the Enforcer plugin to ensure that projects set a
> ${project.description} that is different to their parent. I'm using
> an organization-wide POM, and the rule is specified here:
> 
>   https://github.com/io7m/primogenitor/blob/develop/pom.xml#L540
> 
> I have an example multi-module project that uses that root POM here:
> 
>   https://github.com/io7m/primogenitor-example-20170304
> 
> If I fail to set a description in the "root" POM of that project
> (in other words, if I remove
> https://github.com/io7m/primogenitor-example-20170304/blob/master/pom.xml#L2
> 0), the Enforcer rule fails the build correctly. However, if I leave
> that description intact but then fail to set a different
> (or indeed any) description in the mod-a POM
> (https://github.com/io7m/primogenitor-example-20170304/blob/master/mod-a/pom
> .xml), the Enforcer plugin doesn't catch it. I would expect the linked
> example project to fail to build, but it doesn't!
> 
> Am I doing something wrong? I thought the purpose of the
> requirePropertyDiverges rule was to check the current project against
> its immediate parent. If this is correct, then something appears to be
> wrong with the plugin...
> 
> M



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



Enforcer requirePropertyDiverges not propagated to descendants?

2017-03-04 Thread org . apache . maven . user
Hello.

I'm trying to use the Enforcer plugin to ensure that projects set a
${project.description} that is different to their parent. I'm using
an organization-wide POM, and the rule is specified here:

  https://github.com/io7m/primogenitor/blob/develop/pom.xml#L540

I have an example multi-module project that uses that root POM here:

  https://github.com/io7m/primogenitor-example-20170304

If I fail to set a description in the "root" POM of that project
(in other words, if I remove
https://github.com/io7m/primogenitor-example-20170304/blob/master/pom.xml#L20),
the Enforcer rule fails the build correctly. However, if I leave
that description intact but then fail to set a different
(or indeed any) description in the mod-a POM
(https://github.com/io7m/primogenitor-example-20170304/blob/master/mod-a/pom.xml),
the Enforcer plugin doesn't catch it. I would expect the linked example
project to fail to build, but it doesn't!

Am I doing something wrong? I thought the purpose of the
requirePropertyDiverges rule was to check the current project against
its immediate parent. If this is correct, then something appears to be
wrong with the plugin...

M


pgp1k4qKQDnm1.pgp
Description: OpenPGP digital signature