I should start by saying that I haven't followed the entire thread on this subject, so if something I say here has been beat to death elsewhere just write me off as a lurker and go on...

I have started specifying versions for all lifecycle plugins in my "company POM" with the hopes that would be enough to lock all plugin versions. If you can make it so that I can specify something like "org.apache.maven.pom:lifecycle:2.0.7" or "com.mycompany:plugin-versions:1.1.6" (with all the proper XML around it, of course) as a dependency/mix-in/etc which would lock down all of the plugin versions, I am all in favor of (A). Part of the difficulty in this is getting all of the plugins to lock down their dependencies so that using version x.y.z of a plugin will always and forever more use the same specific version of each dependency. If something as simple as described above is not feasible, then I think we must go the route of (B) to avoid major user (and especially new user) headaches just trying to get a simple project started.

Another possibility, although probably a major PITA, would be to allow but warn if versions are not specified if the project version is a snapshot. This would allow a user to start version x.y.z-SNAPSHOT of a project, comment out the version numbers for the plugins, and get the current versions downloaded and identified. When the user is ready to lock down the plugin versions, they just fill in the version numbers from the messages produced during the build. The biggest problem with this is identifying which plugins should produce a warning.

One last idea: Since this is likely to involve a increment in the model version (I think I saw "4.1.0"), how about adding a required model element with a syntax like "parent" which specifies the version list? If it can be inherited, it makes it easy to specify the value for entire project trees. By making it required (or producing a warning if not specified), you encourage users to make the specification. If each Maven release provides an example with the latest release versions of each plugin at the time the Maven release is created, then there would be very little editing required by the user to make a custom version to update certain plugins; the new user can get everything specified automatically with a very short POM so the amount of typing required just to get a project off the ground would be minimal.

----- Original Message ----- From: "Brett Porter" <[EMAIL PROTECTED]>
To: "Maven Developers List" <dev@maven.apache.org>
Sent: Saturday, September 01, 2007 10:48 PM
Subject: [poll] Requiring users to specify plugin versions in Maven 2.1 or later


I'd like to hear from as many people as possible their opinion this
topic (even if you just want to say '0' so we know where you stand).

[ ] (A) All plugin versions must be specified by the project or its
parent hierarchy somewhere, at the cost of some verbosity (though we
should look at ways to make this easier/smaller/etc per the current
discussion)
[ ] (B) Retain the current behaviour, but make using the enforcer a
best practice to do the above, or some other control mechanism such
as having the repository manager handle the available plugins
[ ] (C) No opinion
[ ] (D) Undecided
[ ] (E) Other (please specify)

Thanks,
Brett

--
Brett Porter - [EMAIL PROTECTED]
Blog: http://www.devzuz.org/blogs/bporter/





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to