-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Affected version
ALL Maven 3.x released so far. Maven 4 is not affected (maven-cli, while maven-embedder there is also affected but unused).
Bug description
Setup:
- build extension is used that uses parent P
- the current project uses same parent P as well
In this case, location tracking in project for items coming from P are LOST. Enforcer rule like requirePluginVersion will fail as it will assume all plugins are coming from super-POM or lifecycle, which in fact is not true.
Reason: P will be "early loaded" (and cached!) as "dependency POM" without location tracking. Later on, when project model is built, cache will contain P and will be reused by project builder to build project model, but cached P will lack many required extra properties like location tracking, marking no location for items coming from parent. Reason is improper cache isolation between sessions for "early loaded" build plugins and session for "project building".
Maven 4 is main execution path is via maven-cli and is not affected, as it creates properly isolated cache instances for two spots. Maven 4 is affected if execution happens via deprecated maven-embedder.