---- Matthias Wessendorf <[EMAIL PROTECTED]> schrieb: > On Jan 21, 2008 12:03 AM, Simon Kitching <[EMAIL PROTECTED]> wrote: > > ---- [EMAIL PROTECTED] schrieb: > > > -removed redundant versions as well... > > > > > <plugin> > > > - <groupId>org.apache.myfaces.trinidadbuild</groupId> > > > - <artifactId>maven-faces-plugin</artifactId> > > > - <version>1.2.6-SNAPSHOT</version> > > > + <groupId>org.apache.myfaces.buildtools</groupId> > > > + <artifactId>myfaces-faces-plugin</artifactId> > > > > Why is there no version tag here? > > because this is inheriting the version from the plugin-mgmt. > > > > > > A plugin with no version specified == unpredictable builds. > > > > > --- myfaces/core/trunk_1.2.x/pom.xml (original) > > > +++ myfaces/core/trunk_1.2.x/pom.xml Sun Jan 20 19:50:35 2008 > > > @@ -64,9 +64,9 @@ > > > <pluginManagement> > > > <plugins> > > > <plugin> > > > - <groupId>org.apache.myfaces.trinidadbuild</groupId> > > > - <artifactId>maven-faces-plugin</artifactId> > > > - <version>1.2.6-SNAPSHOT</version> > > > + <groupId>org.apache.myfaces.buildtools</groupId> > > > + <artifactId>myfaces-faces-plugin</artifactId> > > > + <version>1.0.0-SNAPSHOT</version> > > > > That looks better to me... > > from this one..
Ah, should have my eyes checked! I do not like using pluginManagement (or dependencyManagement) to manage artifact versions. I think it is obscure, and would much rather see the actual version attached to each use (as it originally was). Yes, the above approach will work. But it is worrying to look at a pom and see something without a version attached. It requires work to confirm that this is valid (ie that a parent does define a version). And it sets a bad example for other people; I have just been through all the poms and cleaned up *many* cases where plugins and dependencies were being used without any version being declared anywhere. The supposed advantage of declaring the version in a parent pom is that all the children can be "pushed" to a new version at once. But in fact that is not true, because this requires (a) a new version of the parent to be released, then (b) every child be updated to use the new parent. Ok, it does work a little better during SNAPSHOT cycles, where a modified parent gets picked up automatically. But there is no great advantage in having all child modules using the same plugin version anyway. If a module works with version X of a plugin, then why move to a different one? That just risks breakage of that module for no gain, as it worked fine before with the old one. Regards, Simon
