maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Heinz Marbaise (JIRA)" <j...@codehaus.org>
Subject [jira] (MENFORCER-186) Create a rule for the reactor (RequireReactorSameVersion?)
Date Fri, 14 Mar 2014 21:05:00 GMT

    [ https://jira.codehaus.org/browse/MENFORCER-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=342916#comment-342916
] 

Karl Heinz Marbaise commented on MENFORCER-186:
-----------------------------------------------

First working implementation [r1577707|http://svn.apache.org/r1577707].

> 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 a parent version of 1.1.0-SNAPSHOT instead of 1.2.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 (except your SNAPSHOT's have been deleted before), 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 a 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)

Mime
View raw message