gnodet-bot commented on code in PR #12694:
URL: https://github.com/apache/maven/pull/12694#discussion_r4048592178
##########
impl/maven-core/src/main/resources/org/apache/maven/lifecycle/plugin-versions.properties:
##########
@@ -17,19 +17,19 @@
# Default lifecycle plugin versions.
# Values are substituted by Maven resource filtering at build time from
-# POM properties (lifecycle.<name>-plugin), making them visible to
+# POM properties (version.maven-<name>-plugin), making them visible to
# dependency-update bots such as Dependabot and Renovate.
-lifecycle.maven-clean-plugin=${lifecycle.maven-clean-plugin}
-lifecycle.maven-compiler-plugin=${lifecycle.maven-compiler-plugin}
-lifecycle.maven-deploy-plugin=${lifecycle.maven-deploy-plugin}
-lifecycle.maven-ear-plugin=${lifecycle.maven-ear-plugin}
-lifecycle.maven-ejb-plugin=${lifecycle.maven-ejb-plugin}
-lifecycle.maven-install-plugin=${lifecycle.maven-install-plugin}
-lifecycle.maven-jar-plugin=${lifecycle.maven-jar-plugin}
-lifecycle.maven-plugin-plugin=${lifecycle.maven-plugin-plugin}
-lifecycle.maven-rar-plugin=${lifecycle.maven-rar-plugin}
-lifecycle.maven-resources-plugin=${lifecycle.maven-resources-plugin}
-lifecycle.maven-site-plugin=${lifecycle.maven-site-plugin}
-lifecycle.maven-surefire-plugin=${lifecycle.maven-surefire-plugin}
-lifecycle.maven-war-plugin=${lifecycle.maven-war-plugin}
+version.maven-clean-plugin=${version.maven-clean-plugin}
Review Comment:
**[high] Property key rename not matched in `pom.xml` — CI breaks with
`ExceptionInInitializerError`**
This file now uses `version.maven-*-plugin` keys, and `PluginVersions.java`
looks up `"version." + pluginArtifactId`. But `impl/maven-core/pom.xml` (head
commit `98cb72b4`) still declares the properties under the old
`lifecycle.maven-*-plugin` names:
```xml
<lifecycle.maven-clean-plugin>3.5.0</lifecycle.maven-clean-plugin>
```
Maven's resource filtering substitutes `${version.maven-clean-plugin}` only
if a property named `version.maven-clean-plugin` exists in the POM. Since it
doesn't, the placeholder is left unresolved, and `PluginVersions.version()`
hits the `version.startsWith("${")` guard and throws
`ExceptionInInitializerError`. This is confirmed by the CI failure:
```
Tests run: 14, Failures: 0, Errors: 14 — in LifecycleExecutorTest
at
org.apache.maven.lifecycle.PluginVersions.version(PluginVersions.java:60)
at
org.apache.maven.lifecycle.PluginVersions.<clinit>(PluginVersions.java:71)
```
Fix: rename the 13 `<lifecycle.maven-*-plugin>` properties in
`impl/maven-core/pom.xml` to `<version.maven-*-plugin>`, and update the
`${lifecycle.maven-*-plugin}` expressions in the `<pluginManagement>` section
to `${version.maven-*-plugin}`. The `versions-update` profile (now removed)
also referenced these names, but that's deleted in this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]