[BUILD-169] Update maven-enforcer-plugin to 1.3.1 Created: 21/Oct/14  Updated: 13/Apr/17  Resolved: 22/Oct/14

Status: Closed
Project: Build
Component/s: None
Affects Version/s: None
Fix Version/s: POMs 30

Type: Task Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to BUILD-179 Enforce setting versions on plugins Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty

 Description   

For now, we'll probably just add <requirePluginVersions>, which will help fixing BUILD-165. Some other newer rules (we've been using 1.0.1 so far) could be interesting, perhaps for releases:
http://maven.apache.org/enforcer/enforcer-rules/index.html



 Comments   
Comment by Magnolia International [ 21/Oct/14 ]

The <requirePluginVersions> rule seems to work on-and-off. When a project declares a "new" plugin without a version, the build bails; but when a project uses a plugin indirectly (declared in parent pom, but not used when building the parent pom, such as build-helper-plugin), then we get a mere warning.

Comment by Magnolia International [ 21/Oct/14 ]

In fact, when doing mvn -P continuous-integration clean, the rule also seems to be ignored.
Ditto when doing mvn build-helper:remove-project-artifact

Comment by Magnolia International [ 22/Oct/14 ]

Figured it out:

  • A version-less plugin is bound to the clean phase.
  • Naturally, to try an detect the problem, I called for the clean phase and the profile where the plugin is bound (tried w/ and w/o profile)
  • The enforcer plugin, on the other hand is bound to the validate phase of the default lifecycle.
  • I only just realized that executing the clean lifecycle does not execute the validate phase !
Generated at Sun Feb 11 23:39:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.