[ https://jira.codehaus.org/browse/MENFORCER-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Karl Heinz Marbaise reassigned MENFORCER-186: --------------------------------------------- Assignee: Karl Heinz Marbaise > Create a rule for the reactor (RequireReactorSameVersion?) > ---------------------------------------------------------- > > Key: MENFORCER-186 > URL: https://jira.codehaus.org/browse/MENFORCER-186 > Project: Maven Enforcer Plugin > Issue Type: New Feature > Components: Standard Rules > Affects Versions: 1.3.1 > Reporter: Karl Heinz Marbaise > Assignee: Karl Heinz Marbaise > Priority: Minor > Fix For: 1.4 > > > It would be nice having a rule which checks the consitency of a multi-module > build. > Say having a build with modules like this: > {code} > +-- root (pom.xml) > +--- m1 (pom.xml) > +--- m11 (pom.xml) > +--- m12 (pom.xml) > +--- m2 (pom.xml) > +--- m21 (pom.xml) > +--- m21 (pom.xml) > +--- m3 (pom.xml) > +--- m31 (pom.xml) > +--- m31 (pom.xml) > +--- m4 (pom.xml) > +--- m5 (pom.xml) > {code} > If you have for all modules the version 1.2.0-SNAPSHOT everything is fine. > But what sometimes it happens that someone changes something and you will > find things like the following: > The module m21 (pom.xml) has no a parent version of 1.1.0-SNAPSHOT which > means maven will try to find this version in repository (you will get a > warning during the build; But who reads warnings ;-)).. > Or other things having module interdependencies and it happens someone does > something like this: > In m4 a dependency is written like this: > {code} > <dependency> > <groupId>TheGroup</groupId> > <artifactId>m21</artifactId> > <version>1.1.0-SNAPSHOT</version> > </dependency> > {code} > which will usually build, but it is not correct. or better like this: > {code} > <dependency> > <groupId>TheGroup</groupId> > <artifactId>m21</artifactId> > <version>1.1.0</version> > </dependency> > {code} > This means it will be solved against the released version which usually is > not the intention in such cases. > So the rule should check if the groupId/artifactId belongs to the reactor and > check the consistency of the version of the dependencies etc. Also the parent > would be nice. -- This message was sent by Atlassian JIRA (v6.1.6#6162)