Hi all, I've just realised that the "prerequisites" section of a parent pom is not inherited by its children.
This surprised me - but it is also documented that this section doesn't inherit[1] My question is is this intentional or an oversight? We have a parent pom that mandates maven3 (and several plugins require it) but when used in a child with Maven2 instead of the expected nice warning: [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Unable to build project 'C:\workarea\source\foo\base\pom.xml; it requires Maven version 3.0.4 [INFO] ------------------------------------------------------------------------ I am met with [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Foo [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error resolving version for x.y.z:threadsafety-maven-plugin': Plugin requires Maven version 3.0.4 And this error doesn't come immediately (and only appears if we have a plugin that requires 3.0.4) I found A JIRA[2] that is closed won't fix but this the comment by Jason doesn't make sense to me "The prerequisite tag is for ensuring a particular tool has the right environment. Not to ensure that your developers do! This should not be inherited. The Tools (maven plugins) needs the right environment (3.0.4+)? We are inheriting plugins that require 3.0.4 so it is good to say this is the case is it not and do not expect that all developers need to re-add a prerequisites tag? Or to put it another way - the build should fail fast if it is guaranteed to fail - (due to the plugin configuration/binding in the parent sub projects are guaranteed to fail - unless someone overrides many plugin versions and configuration). Regards, /James [1] http://maven.apache.org/pom.html#Inheritance [2] http://jira.codehaus.org/browse/MNG-2423
