Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.0-alpha-4
-
Fix Version/s: 3.0-beta-1
-
Component/s: Plugins and Lifecycle
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
As reported by Sebastian Annies in Using a specific plugin version in custom lifecycle, the plugin version given by a lifecycle mapping like
<verify>org.apache.maven.plugins:maven-source-plugin:2.1:jar-no-fork</verify>
is not respected by Maven 3.0, it's preferring the version from the plugin management of the super POM instead.
Personally I didn't even know you could put a version into the lifecycle, I've never seen that done.
Second, I always subscribe to the theory that "closest" wins. In the inheritance case, it means things in my pom override my parent pom, which overrides the grandparent etc. I think in this case, the pom is "closer" than the lifecycle and therefore it should win as is happening in the 3.x case. In otherwords, if I use a lifecycle that defines a version but need to tweak the version how would I do it? The pom is my only vechicle for overriding it.