chore: add versions:update-properties workflow for lifecycle plugin versions - #13166
Conversation
gnodet-bot
left a comment
There was a problem hiding this comment.
Good problem statement — the Dependabot root-cause is well-diagnosed and the workaround is sound. A few issues to fix before merging.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after c2700e7d (restrict to minor/patch updates). The new commit added -DallowMajorUpdates=false to the workflow command, which is the right call — but none of the four findings from the previous review have been addressed.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
gnodet-bot
left a comment
There was a problem hiding this comment.
All six findings from the previous review are addressed — permissions restructured, SHA pins applied, fail-fast: false added, and the token switched to secrets.GH_TOKEN. One issue introduced in this pass: the peter-evans/create-pull-request SHA in the version comment is wrong (see inline).
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
|
||
| - name: Create Pull Request | ||
| if: steps.changes.outputs.changed == 'true' | ||
| uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.6 |
There was a problem hiding this comment.
5e914681df9dc83aa4e4905692ca88beb2f9e91f corresponds to v7.0.5, not v7.0.6. The comment is misleading — anyone trying to audit or update this pin will be confused by the discrepancy.
The correct SHA for v7.0.6 is 67ccf781d68cd99b580ae25a5c18a1cc84ffff1f. Note: my previous suggestion (5e914681...# v7.0.6) had the wrong label — this was my error, sorry. The correct fix:
| uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.6 | |
| uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 |
| mvn -B versions:update-properties \ | ||
| -Pversions-update \ | ||
| -DallowMajorUpdates=false \ | ||
| -DincludeProperties="version.maven-clean-plugin,version.maven-compiler-plugin,version.maven-deploy-plugin,version.maven-ear-plugin,version.maven-ejb-plugin,version.maven-install-plugin,version.maven-jar-plugin,version.maven-plugin-plugin,version.maven-rar-plugin,version.maven-resources-plugin,version.maven-site-plugin,version.maven-surefire-plugin,version.maven-war-plugin" \ |
There was a problem hiding this comment.
Why not put everything in new profile configuration, and simply call versions:update-properties
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>versions-maven-plugin</artifactId> | ||
| <version>2.18.0</version> |
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after f6a1987c (replace peter-evans/create-pull-request with gh pr create). Three findings — one is a regression introduced by this commit.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| run: | | ||
| if git diff --quiet impl/maven-core/pom.xml; then | ||
| echo "No lifecycle plugin version changes detected." | ||
| exit 0 |
There was a problem hiding this comment.
github.token re-introduced — PRs it creates won't trigger CI. Commit 9c41c1ad correctly switched to secrets.GH_TOKEN to work around the GitHub limitation that PRs opened by the built-in token do not trigger on: pull_request workflows. That fix was lost when peter-evans/create-pull-request was replaced — github.token is back. The update PRs will have no Java CI checks.
| exit 0 | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} |
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>versions-maven-plugin</artifactId> | ||
| <version>2.18.0</version> |
There was a problem hiding this comment.
💡 versions-maven-plugin is outdated — 2.22.0 is available on Maven Central (four releases since 2.18.0). This was flagged by @slawekjaranowski and not yet addressed.
| <version>2.18.0</version> | |
| <version>2.22.0</version> |
| BRANCH: update/lifecycle-plugins-${{ matrix.branch }} | ||
| BASE_BRANCH: ${{ matrix.branch }} |
There was a problem hiding this comment.
💡 -DincludeProperties should move into the profile config, not the CLI. @slawekjaranowski asked why it's not in the profile. <includeProperties> is a valid POM configuration parameter for versions-maven-plugin — adding it to the versions-update profile in pom.xml would make the profile fully self-contained and simplify the workflow command to:
mvn -B versions:update-properties -Pversions-update -pl impl/maven-core
The profile's own comment even shows the -DincludeProperties flag but doesn't deliver it as config.
|
Why not just The command above on master gave me: diff --git a/impl/maven-core/pom.xml b/impl/maven-core/pom.xml
index fe8f6d10de..9567310ed9 100644
--- a/impl/maven-core/pom.xml
+++ b/impl/maven-core/pom.xml
@@ -36,19 +36,19 @@ under the License.
Maintained here so that dependency-update bots (Dependabot, Renovate)
can propose version bumps automatically. Values are filtered into
plugin-versions.properties at build time and loaded at runtime. -->
- <version.maven-clean-plugin>3.4.0</version.maven-clean-plugin>
- <version.maven-compiler-plugin>3.13.0</version.maven-compiler-plugin>
- <version.maven-deploy-plugin>3.1.3</version.maven-deploy-plugin>
- <version.maven-ear-plugin>3.3.0</version.maven-ear-plugin>
- <version.maven-ejb-plugin>3.2.1</version.maven-ejb-plugin>
- <version.maven-install-plugin>3.1.3</version.maven-install-plugin>
- <version.maven-jar-plugin>3.4.2</version.maven-jar-plugin>
- <version.maven-plugin-plugin>3.15.1</version.maven-plugin-plugin>
- <version.maven-rar-plugin>3.0.0</version.maven-rar-plugin>
- <version.maven-resources-plugin>3.3.1</version.maven-resources-plugin>
- <version.maven-site-plugin>3.21.0</version.maven-site-plugin>
- <version.maven-surefire-plugin>3.5.2</version.maven-surefire-plugin>
- <version.maven-war-plugin>3.4.0</version.maven-war-plugin>
+ <version.maven-clean-plugin>3.5.0</version.maven-clean-plugin>
+ <version.maven-compiler-plugin>3.16.0</version.maven-compiler-plugin>
+ <version.maven-deploy-plugin>3.2.0</version.maven-deploy-plugin>
+ <version.maven-ear-plugin>3.4.0</version.maven-ear-plugin>
+ <version.maven-ejb-plugin>3.3.0</version.maven-ejb-plugin>
+ <version.maven-install-plugin>3.2.0</version.maven-install-plugin>
+ <version.maven-jar-plugin>3.5.1</version.maven-jar-plugin>
+ <version.maven-plugin-plugin>3.16.0</version.maven-plugin-plugin>
+ <version.maven-rar-plugin>3.1.0</version.maven-rar-plugin>
+ <version.maven-resources-plugin>3.5.0</version.maven-resources-plugin>
+ <version.maven-site-plugin>3.22.0</version.maven-site-plugin>
+ <version.maven-surefire-plugin>3.6.0</version.maven-surefire-plugin>
+ <version.maven-war-plugin>3.5.1</version.maven-war-plugin>
</properties>
<dependencies> |
|
Nice — using One real issue plus two smaller points: 1. The 2. 3. (nit) consider Thanks for tackling the dependabot-core limitation head-on — clean interim until dependabot/dependabot-core#16331 lands. |
f6a1987 to
b7c0d93
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after b7c0d93 (switch to toolbox:plugin-versions, squash).
All three findings from the previous CHANGES_REQUESTED are resolved:
- ✅
github.tokenregression →secrets.GH_TOKENis now used throughout - ✅
versions-maven-pluginversion concern → approach switched totoolbox:plugin-versions, noversions-maven-pluginin the workflow - ✅
-DincludePropertiesplacement → moot with the new approach
Two small items remain.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| git add impl/maven-core/pom.xml | ||
| git commit -m "chore: update Maven lifecycle plugin versions" | ||
| git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | ||
| git push --force-with-lease --set-upstream origin "${BRANCH}" |
There was a problem hiding this comment.
💡 --force-with-lease without a remote tracking ref = unconditional force push. actions/checkout checks out matrix.branch and doesn't fetch update/lifecycle-plugins-*; git switch --create creates a local branch with no upstream tracking ref. Without a tracking ref to lease against, --force-with-lease silently falls back to --force — so it provides no protection on the second and subsequent runs.
For a bot-owned throwaway branch this is safe in practice, but the flag is misleading. Either use plain --force (honest) or fetch the remote tracking ref first:
| git push --force-with-lease --set-upstream origin "${BRANCH}" | |
| git push --force --set-upstream origin "${BRANCH}" |
| --base "${BASE_BRANCH}" \ | ||
| --head "${BRANCH}" \ | ||
| --title "chore: update Maven lifecycle plugin versions (${BASE_BRANCH})" \ | ||
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ |
There was a problem hiding this comment.
🔧 (nit) Spurious backslash before closing backtick in --body. The shell sequence \\\`` inside double-quotes expands to `— a literal backslash followed by a backtick. GitHub renders this asPluginVersions`.in the PR body (the backslash appears before the period). The trailing` is unintentional — drop it:
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ | |
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ |
b7c0d93 to
274ad93
Compare
274ad93 to
4a29c56
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after 274ad93 (switch to -Pversions-update profile + add pom.xml versions-update profile).
The new commit addresses the approach change (toolbox invoked with a profile instead of -f impl/maven-core). However, the two small items flagged in the previous review are still present verbatim, and a new inaccuracy was introduced in the pom.xml comment.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| git add impl/maven-core/pom.xml | ||
| git commit -m "chore: update Maven lifecycle plugin versions" | ||
| git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | ||
| git push --force-with-lease --set-upstream origin "${BRANCH}" |
There was a problem hiding this comment.
--force-with-lease without a remote tracking ref = unconditional force. actions/checkout checks out matrix.branch; git switch --create creates a local branch with no upstream tracking ref. Without a ref to lease against, --force-with-lease falls back to --force silently, defeating its purpose. For a bot-owned throwaway branch this is safe in practice, but the flag is misleading. Use plain --force:
| git push --force-with-lease --set-upstream origin "${BRANCH}" | |
| git push --force --set-upstream origin "${BRANCH}" |
| --base "${BASE_BRANCH}" \ | ||
| --head "${BRANCH}" \ | ||
| --title "chore: update Maven lifecycle plugin versions (${BASE_BRANCH})" \ | ||
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ |
There was a problem hiding this comment.
🔧 (unresolved nit from previous review) Spurious backslash before closing backtick in --body. The sequence \\\`` inside a double-quoted shell string expands to `— a literal backslash followed by a backtick. GitHub renders this asPluginVersions`.in the PR body. ShellCheck SC1073 flags this as a parse error. Drop the\`:
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ | |
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ |
| properties (in impl/maven-core/pom.xml) to their corresponding Maven | ||
| plugin artifacts, enabling: | ||
|
|
||
| mvn versions:update-properties -Pversions-update \ |
There was a problem hiding this comment.
📝 (new) Comment-to-code mismatch. The comment says the profile enables mvn versions:update-properties, but the workflow runs toolbox:plugin-versions, not versions:update-properties. The profile configures versions-maven-plugin for its <properties> mapping — that mapping is what toolbox:plugin-versions reads when invoked with -Pversions-update. The comment should reflect this. Suggest updating:
| mvn versions:update-properties -Pversions-update \ | |
| mvn -B eu.maveniverse.maven.plugins:toolbox:plugin-versions \ | |
| -Pversions-update \ | |
| -DartifactVersionMatcherSpec="not(any(snapshotOrPreview()))" \ | |
| -Dapply |
Or clarify that versions:update-properties is the manual alternative if you want to keep it as an example, but note it is not what the workflow runs.
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after 4a29c56 (fail-fast: false added, squash). One of the two remaining items from the previous review is now resolved:
- ✅
fail-fast: false— added at line 36 - ❌
--force-with-leasewithout remote tracking ref — still present (line 78) - ❌ Spurious backslash in
--body— still present (line 91)
Additionally, the versions-update profile comment in pom.xml is stale — it still describes the old mvn versions:update-properties approach, not the current toolbox:plugin-versions workflow.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| git add impl/maven-core/pom.xml | ||
| git commit -m "chore: update Maven lifecycle plugin versions" | ||
| git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | ||
| git push --force-with-lease --set-upstream origin "${BRANCH}" |
There was a problem hiding this comment.
--force-with-lease without a remote tracking ref behaves like --force here. actions/checkout checks out ${{ matrix.branch }} only — it does not fetch update/lifecycle-plugins-*. git switch --create creates a local branch with no upstream tracking ref. Without a remote-tracking ref to lease against, Git falls back to an unconditional force push. The safety guarantee of --force-with-lease (abort if someone else pushed in the meantime) is lost.
For a bot-owned throwaway branch, either:
- Use
--forceexplicitly (documents the intent):Suggested changegit push --force-with-lease --set-upstream origin "${BRANCH}" git push --force --set-upstream origin "${BRANCH}" - Or fetch first so the lease has something to verify against:
git fetch origin "${BRANCH}" 2>/dev/null || true git push --force-with-lease --set-upstream origin "${BRANCH}"
| --base "${BASE_BRANCH}" \ | ||
| --head "${BRANCH}" \ | ||
| --title "chore: update Maven lifecycle plugin versions (${BASE_BRANCH})" \ | ||
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ |
There was a problem hiding this comment.
🔧 [NOT ADDRESSED] Spurious backslash before closing backtick renders as PluginVersions\. in the PR body. The shell sequence \\\`` inside double-quotes expands to `— a literal backslash followed by a backtick. GitHub renders this asPluginVersions.(backslash before the period). The trailing.` is unintended.
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ | |
| --body "Automated update of Maven lifecycle plugin versions via \`toolbox:plugin-versions\`. These versions are declared in \`impl/maven-core/pom.xml\` and are used by the Maven default lifecycle binding. They are filtered at build time into \`plugin-versions.properties\` and loaded at runtime by \`PluginVersions\`. This PR was created automatically by the \`update-lifecycle-plugins\` workflow." \ |
| --> | ||
| <id>versions-update</id> | ||
| <build> | ||
| <plugins> |
There was a problem hiding this comment.
🔧 Stale comment — describes the old versions:update-properties approach, not the current toolbox:plugin-versions workflow. The comment still shows:
mvn versions:update-properties -Pversions-update \
-DincludeProperties="version.maven-clean-plugin,..." \
-pl impl/maven-core
but the actual workflow now runs toolbox:plugin-versions. The versions-maven-plugin configuration in this profile is also dead code for the automation — toolbox ignores it. The comment should either be updated to reflect the actual workflow command, or the versions-maven-plugin config should be removed if it's no longer used manually either.
For reference, the actual workflow command is:
mvn -B eu.maveniverse.maven.plugins:toolbox:0.16.0:plugin-versions \
-Pversions-update \
-DartifactVersionMatcherSpec="not(any(snapshotOrPreview()))" \
-Dapply
4a29c56 to
e61d44d
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after squash commit e61d44df (cleanup pass).
Previous findings verified:
- ✅
--force-with-lease→ plain--force(line 79) - ✅
--bodybacktick escaping renders correctly in current squash - ✅ SHA pins,
fail-fast: false, permissions restructured,GH_TOKEN— all solid
One unresolved concern (first raised by @cstamas and @ascheman) plus one documentation nit.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| branch: [master, maven-4.0.x] |
There was a problem hiding this comment.
maven-4.0.x matrix leg is a no-op. This PR adds the versions-update profile to pom.xml on master only. When the workflow matrix checks out maven-4.0.x and runs mvn -f impl/maven-core -Pversions-update …, the root pom.xml on maven-4.0.x does not have this profile — Maven silently skips or warns "profile not found". The maven-4.0.x leg never produces a PR.
The profile needs to be backported to maven-4.0.x, or the matrix should be limited to [master] until it is:
| branch: [master, maven-4.0.x] | |
| branch: [master] |
| <profile> | ||
| <!-- | ||
| This profile is NEVER activated during a normal build. | ||
| It declares the 13 Maven lifecycle plugins under pluginManagement, |
There was a problem hiding this comment.
📝 (nit) Comment says “pluginsManagement” but no <pluginManagement> block exists in this profile. The profile configures versions-maven-plugin’s <configuration><properties> — not a <pluginManagement> section. The comment description of the mechanism is inaccurate. Also the example command shows toolbox:plugin-versions without a version, while the workflow pins toolbox:0.16.0:plugin-versions.
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after e61d44df (fix --force, spurious backslash, stale pom comment, add -f impl/maven-core).
Resolved since last review:
- ✅
--force-with-lease→--force(correct) - ✅ Spurious backslash in
--body— corrected; the prior finding was valid:\\`` inside a double-quoted bash string passes a literal`togh, which GitHub Markdown renders as`` instead of inline-code backtick notation - ✅ Stale pom.xml comment — rewritten to accurately describe the
toolbox:plugin-versionsapproach
Two issues remain.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| run: | | ||
| mvn -B eu.maveniverse.maven.plugins:toolbox:0.16.0:plugin-versions \ | ||
| -f impl/maven-core \ | ||
| -Pversions-update \ |
There was a problem hiding this comment.
-Pversions-update will hard-fail on the maven-4.0.x matrix leg.
This PR adds the versions-update profile to the root pom.xml on master only. When the matrix checks out maven-4.0.x, that profile does not exist there. Maven 4 treats -P<profile> as a required profile activation (activateRequiredProfile()), and DefaultMaven.validateRequiredProfiles() throws MissingProfilesException when any required profile is absent — see DefaultMaven.java L565. The build exits with BUILD FAILURE before toolbox runs, so no update PR is ever created for maven-4.0.x.
@slawekjaranowski raised this in his review comment — still unresolved.
Fix options (pick one):
- Backport the profile to
maven-4.0.x— add theversions-updateprofile topom.xmlon that branch. - Drop
-Pversions-update— toolbox readspluginManagementfromimpl/maven-core/pom.xmldirectly (the 13 plugins with${version.maven-*-plugin}references are already declared there from Externalize default lifecycle plugin versions to POM properties #13080), so the profile is not consulted by toolbox at all. @cstamas confirmed this already works without the profile:mvn toolbox:plugin-versions -f impl/maven-core/ -Dapply. - Make it optional: use
-P?versions-update— Maven silently skips absent optional profiles instead of failing.
| This profile is NEVER activated during a normal build. | ||
| It declares the 13 Maven lifecycle plugins under pluginManagement, | ||
| establishing the link between the version.maven-*-plugin properties | ||
| (in impl/maven-core/pom.xml) and their corresponding plugin artifacts. |
There was a problem hiding this comment.
📝 Clarify what this profile provides to toolbox (or note it is for manual use only).
The comment says the profile lets toolbox "resolve the property-to-GAV mapping". In practice, toolbox reads pluginManagement from the project specified by -f impl/maven-core, and that POM already declares all 13 lifecycle plugins under its own <pluginManagement> (from #13080). This profile adds versions-maven-plugin <properties> configuration — a different schema that toolbox does not consult.
The profile is a valid manual alternative for mvn versions:update-properties -Pversions-update -pl impl/maven-core, but it plays no functional role in the toolbox:plugin-versions workflow invocation. The comment would be clearer if it noted this distinction.
55d7c84 to
8a29466
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after 8a29466e (rename properties version.maven-*-plugin → lifecycle.*-plugin, move versions-update profile to impl/maven-core/pom.xml, remove root pom.xml profile).
Resolved since last review:
- ✅ Misleading profile comment (versions-maven-plugin vs toolbox) — root
pom.xmlprofile gone; newimpl/maven-core/pom.xmlprofile has clean<pluginManagement>-only content, comment is accurate - ✅
PluginVersions.javaJavadoc updated to{@code lifecycle.<name>-plugin}
Two issues remain, one new issue introduced.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| run: | | ||
| mvn -B eu.maveniverse.maven.plugins:toolbox:0.16.0:plugin-versions \ | ||
| -f impl/maven-core \ | ||
| -Pversions-update \ |
There was a problem hiding this comment.
-Pversions-update still hard-fails on the maven-4.0.x matrix leg.
Moving the profile from root pom.xml to impl/maven-core/pom.xml fixes the master leg — when the workflow checks out master, impl/maven-core/pom.xml now contains the versions-update profile. ✅
But when the matrix checks out maven-4.0.x, it reads maven-4.0.x's impl/maven-core/pom.xml, which still has no versions-update profile. Maven 4 still throws MissingProfilesException (via DefaultMaven.validateRequiredProfiles()) and the maven-4.0.x leg will always fail before toolbox runs.
Fix options — pick one:
- Make it optional:
-P?versions-update— Maven silently skips absent optional profiles. - Backport the profile to
maven-4.0.x(requires a separate PR on that branch). - Drop
-Pversions-updateentirely — @cstamas already demonstrated toolbox works without it (mvn toolbox:plugin-versions -f impl/maven-core/ -Dapply), reading pluginManagement directly from the project POM.
| -Pversions-update \ | |
| -Pversions-update \ |
→ change to -P?versions-update \ to unblock immediately.
| fi | ||
|
|
||
| echo "--- Updated properties ---" | ||
| git diff impl/maven-core/pom.xml | grep '^[+-].*version\.maven' | grep -v '^---\|^+++' |
There was a problem hiding this comment.
🐛 Grep pattern is now dead — will never match after property rename.
The properties were renamed from version.maven-*-plugin to lifecycle.*-plugin, but the pattern here still looks for version\.maven. Every weekly run will silently print --- Updated properties --- followed by nothing, even when real updates were applied. The diff preview is completely broken.
| git diff impl/maven-core/pom.xml | grep '^[+-].*version\.maven' | grep -v '^---\|^+++' | |
| git diff impl/maven-core/pom.xml | grep '^[+-].*lifecycle\.' | grep -v '^---\|^+++' |
| @@ -20,16 +20,16 @@ | |||
| # POM properties (version.maven-<name>-plugin), making them visible to | |||
There was a problem hiding this comment.
📝 Stale comment — still references the old version.maven-<name>-plugin naming.
The properties in this file were renamed to lifecycle.*-plugin, but the comment on line 20 still says POM properties (version.maven-<name>-plugin). Should be updated to match.
| # POM properties (version.maven-<name>-plugin), making them visible to | |
| # POM properties (lifecycle.<name>-plugin), making them visible to |
8a29466 to
acc326e
Compare
d4bf72d to
76d0ade
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after acc326e4 (switch from toolbox:plugin-versions to versions:update-properties, property rename in plugin-versions.properties).
Status of prior findings:
| Finding | Status |
|---|---|
fail-fast: false missing |
✅ Resolved (line 36) |
| Grep pattern dead after rename | ✅ Resolved — versions:update-properties updates version.maven-*-plugin props in impl/maven-core/pom.xml; grep still matches |
github.token won't trigger CI |
🔴 Regression reintroduced — was secrets.GH_TOKEN in 8a29466e, reverted to github.token here |
-Pversions-update hard-fails on maven-4.0.x |
🔴 Still unresolved — profile exists only in master's pom.xml |
Stale comment in plugin-versions.properties |
🟡 Partially — keys renamed to lifecycle.* but comment still says version.maven-<name>-plugin |
versions-maven-plugin 2.22.0 available |
❌ Not addressed — still 2.18.0 |
New finding in this commit:
🚨 BUILD BREAK — plugin-versions.properties uses ${lifecycle.clean-plugin} placeholders, but impl/maven-core/pom.xml (unchanged from master) only defines version.maven-clean-plugin properties. There is no lifecycle.* property defined anywhere in the POM hierarchy. Maven resource filtering will leave the placeholders unresolved as literal ${lifecycle.clean-plugin} strings. PluginVersions.java explicitly checks for this:
if (version.startsWith("${")) {
throw new ExceptionInInitializerError(...);
}Maven will fail to start. The fix requires one of:
- Keep
${version.maven-clean-plugin}as the placeholder values inplugin-versions.properties(keys staylifecycle.*, values reference existing properties), OR - Rename the properties in
impl/maven-core/pom.xmlfromversion.maven-*-plugintolifecycle.*, and update theversions-updateprofile's<property><name>entries accordingly
Note: the second approach breaks Dependabot/Renovate detection (they look for version.maven-*-plugin pattern), so option 1 is likely preferable.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| lifecycle.clean-plugin=${lifecycle.clean-plugin} | ||
| lifecycle.compiler-plugin=${lifecycle.compiler-plugin} | ||
| lifecycle.deploy-plugin=${lifecycle.deploy-plugin} | ||
| lifecycle.ear-plugin=${lifecycle.ear-plugin} | ||
| lifecycle.ejb-plugin=${lifecycle.ejb-plugin} | ||
| lifecycle.install-plugin=${lifecycle.install-plugin} | ||
| lifecycle.jar-plugin=${lifecycle.jar-plugin} | ||
| lifecycle.plugin-plugin=${lifecycle.plugin-plugin} | ||
| lifecycle.rar-plugin=${lifecycle.rar-plugin} | ||
| lifecycle.resources-plugin=${lifecycle.resources-plugin} | ||
| lifecycle.site-plugin=${lifecycle.site-plugin} | ||
| lifecycle.surefire-plugin=${lifecycle.surefire-plugin} | ||
| lifecycle.war-plugin=${lifecycle.war-plugin} |
There was a problem hiding this comment.
🚨 BUILD BREAK — placeholder-to-property name mismatch.
These filter placeholders reference ${lifecycle.clean-plugin} etc., but impl/maven-core/pom.xml defines properties named version.maven-clean-plugin — the lifecycle.* property names do not exist anywhere in the POM hierarchy. Maven resource filtering will leave these as literal ${lifecycle.*} strings, and PluginVersions.java will throw ExceptionInInitializerError at startup.
Fix: keep the old placeholder form so that the existing version.maven-*-plugin properties resolve correctly:
| lifecycle.clean-plugin=${lifecycle.clean-plugin} | |
| lifecycle.compiler-plugin=${lifecycle.compiler-plugin} | |
| lifecycle.deploy-plugin=${lifecycle.deploy-plugin} | |
| lifecycle.ear-plugin=${lifecycle.ear-plugin} | |
| lifecycle.ejb-plugin=${lifecycle.ejb-plugin} | |
| lifecycle.install-plugin=${lifecycle.install-plugin} | |
| lifecycle.jar-plugin=${lifecycle.jar-plugin} | |
| lifecycle.plugin-plugin=${lifecycle.plugin-plugin} | |
| lifecycle.rar-plugin=${lifecycle.rar-plugin} | |
| lifecycle.resources-plugin=${lifecycle.resources-plugin} | |
| lifecycle.site-plugin=${lifecycle.site-plugin} | |
| lifecycle.surefire-plugin=${lifecycle.surefire-plugin} | |
| lifecycle.war-plugin=${lifecycle.war-plugin} | |
| lifecycle.clean-plugin=${version.maven-clean-plugin} | |
| lifecycle.compiler-plugin=${version.maven-compiler-plugin} | |
| lifecycle.deploy-plugin=${version.maven-deploy-plugin} | |
| lifecycle.ear-plugin=${version.maven-ear-plugin} | |
| lifecycle.ejb-plugin=${version.maven-ejb-plugin} | |
| lifecycle.install-plugin=${version.maven-install-plugin} | |
| lifecycle.jar-plugin=${version.maven-jar-plugin} | |
| lifecycle.plugin-plugin=${version.maven-plugin-plugin} | |
| lifecycle.rar-plugin=${version.maven-rar-plugin} | |
| lifecycle.resources-plugin=${version.maven-resources-plugin} | |
| lifecycle.site-plugin=${version.maven-site-plugin} | |
| lifecycle.surefire-plugin=${version.maven-surefire-plugin} | |
| lifecycle.war-plugin=${version.maven-war-plugin} |
This keeps the lifecycle.* keys (matching what PluginVersions.java now looks up) but resolves them from the existing version.maven-*-plugin properties in impl/maven-core/pom.xml. No changes needed to pom.xml or the versions-update profile.
|
|
||
| - name: Create Pull Request | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} |
There was a problem hiding this comment.
github.token reintroduced; PRs created by this workflow won't trigger CI.
Commit 8a29466e correctly used ${{ secrets.GH_TOKEN }} (a PAT that bypasses GitHub's restriction). This commit reverts to ${{ github.token }}, which GitHub explicitly blocks from triggering downstream workflows on PRs it creates.
| GH_TOKEN: ${{ github.token }} | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} |
A GH_TOKEN org/repo secret must exist with the necessary repo scope. Without it, the automated update PRs will be created silently with no CI run, making the automation effectively useless for verifying the updates are safe.
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after 76d0ade6 (rename properties version.maven-*-plugin → lifecycle.*-plugin, move versions-update profile from impl/maven-core/pom.xml to root pom.xml).
Resolved since last review:
- ✅ Grep pattern fixed:
grep '^[+-].*lifecycle\.'now correctly matches the renamed properties - ✅
--force-with-lease→ plain--force(correct for a freshly-created bot branch)
Three issues remain unresolved and two new ones introduced:
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| run: | | ||
| if git diff --quiet impl/maven-core/pom.xml; then | ||
| echo "No lifecycle plugin version changes detected." | ||
| exit 0 |
There was a problem hiding this comment.
github.token re-introduced — PRs it creates won't trigger CI.
This was fixed in commit 9c41c1ad (switched to secrets.GH_TOKEN), reverted in f6a1987c (lost when peter-evans/create-pull-request was replaced), re-flagged in the f6a1987c review, re-flagged in the e61d44df review, re-flagged in the 8a29466e review — and it's back again.
GitHub explicitly blocks on: pull_request workflow runs on PRs opened by GITHUB_TOKEN. The update PRs will have no Java CI checks. A maintainer will have to manually push a commit or close/reopen to trigger checks.
Use a PAT stored as a repo secret:
| exit 0 | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} |
| @@ -20,16 +20,16 @@ | |||
| # POM properties (version.maven-<name>-plugin), making them visible to | |||
There was a problem hiding this comment.
📝 [NOT ADDRESSED] Stale comment — still references the old version.maven-<name>-plugin naming.
This comment was flagged in the previous review. The properties were renamed to lifecycle.*-plugin but the header comment still says version.maven-<name>-plugin.
| # POM properties (version.maven-<name>-plugin), making them visible to | |
| # POM properties (lifecycle.<name>-plugin), making them visible to |
| plugin artifacts, enabling: | ||
|
|
There was a problem hiding this comment.
📝 Stale comment — property naming doesn't match the actual properties.
The comment says "map the version.maven-*-plugin properties" but those were renamed to lifecycle.*-plugin in this very PR. A reader will be confused when they look at the <property> elements below and see lifecycle.clean-plugin, not version.maven-clean-plugin.
| plugin artifacts, enabling: | |
| It configures versions-maven-plugin to map the lifecycle.*-plugin | |
| properties (in impl/maven-core/pom.xml) to their corresponding Maven |
9a4db01 to
60f1fcd
Compare
| - name: Update lifecycle plugin versions | ||
| run: | | ||
| mvn -B versions:update-properties \ | ||
| -P?versions-update \ |
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after 9a4db016 (fix github.token regression, bump versions-maven-plugin to 2.22.0, make profile optional with -P?).
Resolved since last review:
- ✅
github.tokenregression →secrets.GH_TOKENrestored - ✅
versions-maven-plugin2.18.0 → 2.22.0 - ✅ Stale comment in root
pom.xmlprofile → updated tolifecycle.*-plugin
Two issues remain.
plugin-versions.properties comment (nit, carried over): Line 20 still says # POM properties (version.maven-<name>-plugin) but on master the properties are now named lifecycle.*. Suggest updating to # POM properties (lifecycle.<name>-plugin), making them visible to
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| -P?versions-update \ | ||
| -DallowMajorUpdates=false \ | ||
| -DincludeProperties="lifecycle.clean-plugin,lifecycle.compiler-plugin,lifecycle.deploy-plugin,lifecycle.ear-plugin,lifecycle.ejb-plugin,lifecycle.install-plugin,lifecycle.jar-plugin,lifecycle.plugin-plugin,lifecycle.rar-plugin,lifecycle.resources-plugin,lifecycle.site-plugin,lifecycle.surefire-plugin,lifecycle.war-plugin" \ |
There was a problem hiding this comment.
maven-4.0.x leg is still a no-op.
-P?versions-update makes the profile optional — Maven won't fail if absent. But on maven-4.0.x, the properties in impl/maven-core/pom.xml are still named version.maven-*-plugin (not lifecycle.*). So -DincludeProperties="lifecycle.clean-plugin,..." finds no matching properties in that branch's POM, and without the profile the artifact→property mappings are also absent. The step runs, touches nothing, and exits at "No lifecycle plugin version changes detected." — silently, every week.
The fix depends on intended design:
- Option A (recommended): Backport the property rename to
maven-4.0.x(i.e. apply the samelifecycle.*rename to that branch). The-P?fallback then correctly skips the profile on a future branch that lacks it, but themaven-4.0.xleg works once the rename is in place. - Option B: Keep
version.maven-*-pluginnames onmaven-4.0.xand use those in-DincludePropertiesfor that matrix leg (branch-specific command), along with adding the profile tomaven-4.0.x.
The maven-4.0.x matrix leg provides zero value in its current form and must be fixed before merge.
…ersions Adds a 'versions-update' profile (never activated in normal builds) to the root POM that configures versions-maven-plugin with explicit property→artifact mappings for the 13 lifecycle plugins declared in impl/maven-core/pom.xml. Also adds a GitHub Actions workflow that runs weekly on both master and maven-4.0.x to bump the version.maven-*-plugin properties and open a PR when updates are found. This is a workaround until the Dependabot fix lands: dependabot/dependabot-core#16331 Run manually: mvn versions:update-properties -Pversions-update \ -DincludeProperties='version.maven-clean-plugin,...' \ -pl impl/maven-core
60f1fcd to
f06f9e2
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after 60f1fcdb (squash — appears to revert to an early state of the PR).
This squash has regressed six findings that were previously fixed across commits 9c41c1ad, 4a29c56, and 9a4db016. All six issues are back.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
|
||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' |
There was a problem hiding this comment.
This was fixed in 9c41c1ad8e with actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1. All other workflows in this repo pin to a full commit SHA. This squash dropped the pin.
| java-version: '21' | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| distribution: 'temurin' | ||
| cache: maven | ||
|
|
||
| - name: Update lifecycle plugin versions |
There was a problem hiding this comment.
Fixed in 9c41c1ad8e with actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1. Same pattern as every other workflow in this repo.
| - name: Update lifecycle plugin versions | |
| - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 |
| branch: update/lifecycle-plugins-${{ matrix.branch }} | ||
| base: ${{ matrix.branch }} | ||
| commit-message: "chore: update Maven lifecycle plugin versions" | ||
| title: "chore: update Maven lifecycle plugin versions (${{ matrix.branch }})" |
There was a problem hiding this comment.
Fixed in 9c41c1ad8e with peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.6. The latest v7 tag is now v7.0.11 (22a9089034f40e5a961c8808d113e2c98fb63676), but a SHA pin is mandatory here. This action runs with contents: write + pull-requests: write — a compromised mutable tag can exfiltrate secrets or push arbitrary code.
| title: "chore: update Maven lifecycle plugin versions (${{ matrix.branch }})" | |
| uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 |
| commit-message: "chore: update Maven lifecycle plugin versions" | ||
| title: "chore: update Maven lifecycle plugin versions (${{ matrix.branch }})" | ||
| body: | | ||
| Automated update of Maven lifecycle plugin versions via `versions:update-properties`. |
There was a problem hiding this comment.
🚨 [REGRESSION] GITHUB_TOKEN won't trigger CI on the created PR.
This was fixed in 9c41c1ad8e by switching to secrets.GH_TOKEN. GitHub explicitly blocks on: pull_request CI workflows for PRs opened by a workflow using GITHUB_TOKEN. The resulting version-bump PRs will show no CI status and cannot be merged safely.
| Automated update of Maven lifecycle plugin versions via `versions:update-properties`. | |
| token: ${{ secrets.GH_TOKEN }} |
| with: | ||
| ref: ${{ matrix.branch }} | ||
|
|
||
| - uses: actions/setup-java@v4 |
There was a problem hiding this comment.
💡 [REGRESSION] Missing fail-fast: false.
Fixed in 4a29c56. With the default fail-fast: true, a transient failure on the master leg (flaky Central download, etc.) immediately cancels the maven-4.0.x leg, potentially leaving one branch un-updated with no signal.
| - uses: actions/setup-java@v4 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| branch: [master, maven-4.0.x] |
| with: | ||
| ref: ${{ matrix.branch }} | ||
|
|
||
| - uses: actions/setup-java@v4 |
There was a problem hiding this comment.
🚨 [UNRESOLVED] maven-4.0.x matrix leg is a no-op.
The versions-update profile only exists in master's pom.xml. On maven-4.0.x, -Pversions-update will cause Maven to warn "profile not found" (or hard-fail) and exit without updating anything. maven-4.0.x does have version.maven-*-plugin properties in impl/maven-core/pom.xml, but without the profile the artifact→property mappings are absent. The leg silently produces no PR every week.
Fix options:
- Option A (recommended): Backport the
versions-updateprofile tomaven-4.0.xvia a separate commit/PR on that branch. - Option B: Make the profile optional with
-P?versions-updateand accept themaven-4.0.xleg only works once the profile is backported.
Either way, the maven-4.0.x leg must not run until this is resolved, or the matrix should be reduced to [master] for now.
|
|
||
| The GitHub Actions workflow .github/workflows/update-lifecycle-plugins.yml | ||
| runs this command weekly and opens a PR when updates are found. | ||
| --> |
There was a problem hiding this comment.
💡 [REGRESSION] versions-maven-plugin 2.18.0 — outdated.
Bumped to 2.22.0 in 9a4db016. Current latest is 2.22.0.
| --> | |
| <version>2.22.0</version> |
…*-plugin to lifecycle.*-plugin
The properties in impl/maven-core/pom.xml are renamed from version.maven-*-plugin
to lifecycle.*-plugin to match the keys used in plugin-versions.properties and
PluginVersions.java. All references updated consistently across:
- impl/maven-core/pom.xml (declarations and ${} references)
- pom.xml (versions-update profile property mappings)
- .github/workflows/update-lifecycle-plugins.yml (-DincludeProperties list)
|
|
||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' |
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after 212763a7 (rename version.maven-*-plugin → lifecycle.*-plugin properties).
Status of prior findings from f06f9e2968 review:
| Finding | Status |
|---|---|
Unpinned actions/checkout@v4 |
❌ STILL OPEN |
Unpinned actions/setup-java@v4 |
❌ STILL OPEN |
Unpinned peter-evans/create-pull-request@v7 |
❌ STILL OPEN |
secrets.GITHUB_TOKEN → CI won't trigger on created PRs |
❌ STILL OPEN |
Missing fail-fast: false |
❌ STILL OPEN |
maven-4.0.x matrix leg is a no-op (profile only on master) |
❌ STILL OPEN |
versions-maven-plugin 2.18.0 outdated |
❌ STILL OPEN |
The new commit 212763a7 does not address any of the six workflow findings. It only renames the property keys — and introduces a new critical regression in the filter chain.
New regression (filter chain): plugin-versions.properties now has lifecycle.*-plugin keys but every filter expression still references ${version.maven-*-plugin} — the property names just deleted from pom.xml. At build time, Maven resource filtering won't resolve these references and the literal ${...} strings land in the JAR. The PluginVersions.version() guard then throws ExceptionInInitializerError at JVM startup — Maven won't start. All 13 expressions need updating: e.g. lifecycle.clean-plugin=${lifecycle.clean-plugin} (and likewise for all others).
maven-4.0.x leg (still open): The versions-update profile is defined only in master's root pom.xml. On maven-4.0.x, -Pversions-update will warn-and-no-op or hard-fail. Fix: restrict the matrix to [master] until the profile is backported.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
|
||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' |
There was a problem hiding this comment.
Every other workflow in this repo pins to a full commit SHA. With contents: write + pull-requests: write at the top level, a compromised mutable tag can exfiltrate secrets or push arbitrary code.
| java-version: '21' | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| distribution: 'temurin' | ||
| cache: maven | ||
|
|
||
| - name: Update lifecycle plugin versions |
There was a problem hiding this comment.
| - name: Update lifecycle plugin versions | |
| - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 |
| branch: update/lifecycle-plugins-${{ matrix.branch }} | ||
| base: ${{ matrix.branch }} | ||
| commit-message: "chore: update Maven lifecycle plugin versions" | ||
| title: "chore: update Maven lifecycle plugin versions (${{ matrix.branch }})" |
There was a problem hiding this comment.
Runs with contents: write + pull-requests: write. A SHA pin is mandatory. Latest v7 is v7.0.11:
| title: "chore: update Maven lifecycle plugin versions (${{ matrix.branch }})" | |
| uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 |
| commit-message: "chore: update Maven lifecycle plugin versions" | ||
| title: "chore: update Maven lifecycle plugin versions (${{ matrix.branch }})" | ||
| body: | | ||
| Automated update of Maven lifecycle plugin versions via `versions:update-properties`. |
There was a problem hiding this comment.
🚨 [STILL OPEN] GITHUB_TOKEN → CI won't trigger on created PRs.
GitHub explicitly blocks on: pull_request CI for PRs opened by a workflow using GITHUB_TOKEN. The resulting version-bump PRs will show no CI status and cannot be safely merged.
| Automated update of Maven lifecycle plugin versions via `versions:update-properties`. | |
| token: ${{ secrets.GH_TOKEN }} |
| ref: ${{ matrix.branch }} | ||
|
|
||
| - uses: actions/setup-java@v4 |
There was a problem hiding this comment.
💡 [STILL OPEN] Missing fail-fast: false.
With the default fail-fast: true, a transient failure on one leg immediately cancels the other, leaving one branch un-updated with no signal.
| ref: ${{ matrix.branch }} | |
| - uses: actions/setup-java@v4 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| branch: [master, maven-4.0.x] |
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>versions-maven-plugin</artifactId> | ||
| <version>2.18.0</version> |
There was a problem hiding this comment.
💡 [STILL OPEN] versions-maven-plugin 2.18.0 — current latest is 2.22.0.
| <version>2.18.0</version> | |
| <version>2.22.0</version> |
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after fb38317f (address review comments — pin SHA, replace peter-evans action, secrets.GH_TOKEN, fail-fast, versions-maven-plugin 2.22.0, lifecycle.* property rename).
Status of all seven findings from the 212763a7 review:
| Finding | Status |
|---|---|
Unpinned actions/checkout@v4 |
✅ Resolved — @3d3c42e5 (v7.0.1), matches maven.yml |
Unpinned actions/setup-java@v4 |
✅ Resolved — @de7274f0 (v6.0.1), matches maven.yml |
peter-evans/create-pull-request unpinned |
✅ Resolved — replaced with gh pr create + git push |
secrets.GITHUB_TOKEN won't trigger CI |
✅ Resolved — GH_TOKEN: ${{ secrets.GH_TOKEN }} |
Missing fail-fast: false |
✅ Resolved — added at strategy level |
versions-maven-plugin 2.18.0 outdated |
✅ Resolved — 2.22.0 |
Filter chain breakage (lifecycle.* rename) |
✅ Resolved — grep, properties, PluginVersions.java all consistent |
One unresolved issue remains (raised previously by @cstamas, @ascheman, and earlier reviews) plus one documentation nit introduced in this commit.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| plugin artifacts, enabling: | ||
|
|
||
| mvn versions:update-properties -Pversions-update \ | ||
| DincludeProperties="lifecycle.clean-plugin,..." \ |
There was a problem hiding this comment.
🔧 (nit) Typo in comment example — DincludeProperties missing leading -. Anyone copy-pasting this to run the command manually gets a Maven invocation with an unrecognized system property name DincludeProperties (treated as a property key whose value is "lifecycle.clean-plugin,..."), not a Maven property override.
| DincludeProperties="lifecycle.clean-plugin,..." \ | |
| -DincludeProperties="lifecycle.clean-plugin,..." \ |
|
...on Fix options:
Option 1 is simpler and avoids touching the release branch unnecessarily. This comment was generated by an AI agent, Hermès on behalf of @gnodet. |
fb38317 to
a1bc79d
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after a1bc79d4 (rename properties lifecycle.clean-plugin → lifecycle.maven-*-plugin, fix PluginVersions.java constants to pass maven-clean-plugin etc., fix plugin-versions.properties keys, fix workflow -DincludeProperties to match new names).
Status of all seven findings from fb38317f review:
| Finding | Status |
|---|---|
Unpinned actions/checkout@v4 |
✅ Resolved — @3d3c42e5 (v7.0.1) |
Unpinned actions/setup-java@v4 |
✅ Resolved — @de7274f0 (v6.0.1) |
peter-evans/create-pull-request unpinned |
✅ Resolved — replaced with gh pr create |
secrets.GITHUB_TOKEN won't trigger CI |
✅ Resolved — GH_TOKEN: ${{ secrets.GH_TOKEN }} |
fail-fast: false missing |
✅ Resolved |
versions-maven-plugin 2.18.0 outdated |
✅ Resolved — 2.22.0 in profile |
Filter chain (lifecycle.* rename, PluginVersions key, plugin-versions.properties) |
✅ Resolved — consistent end-to-end |
One unresolved issue remains (raised since the first review by @cstamas, @ascheman, and previous bot reviews) plus one nit.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| branch: [master, maven-4.0.x] |
There was a problem hiding this comment.
maven-4.0.x matrix leg is still a silent no-op (unresolved since initial review).
The versions-update profile is defined only in master's pom.xml. On maven-4.0.x, -P?versions-update silently skips the profile (the ? prefix suppresses the failure). versions:update-properties then runs with no <property> mappings, finds nothing to update, git diff stays empty, and the step exits with "No updates found for maven-4.0.x" every single run — no PR is ever created.
Simplest fix: restrict the matrix to master until the property rename and the versions-update profile are backported to maven-4.0.x.
| branch: [master, maven-4.0.x] | |
| branch: [master] |
There was a problem hiding this comment.
The problème will be fixed with #13172 on maven-4.0.x branch.
| * at build time from POM properties ({@code version.maven-<name>-plugin}). | ||
| * The properties file uses {@code lifecycle.<name>-plugin} keys. |
There was a problem hiding this comment.
🔧 (nit) First Javadoc line is stale. The newly added second line (lifecycle.<name>-plugin keys) is correct, but the first line still says {@code version.maven-<name>-plugin}, which is the old property name scheme. Both lines now say different things for what is effectively the same concept.
| * at build time from POM properties ({@code version.maven-<name>-plugin}). | |
| * The properties file uses {@code lifecycle.<name>-plugin} keys. | |
| * at build time from POM properties ({@code lifecycle.maven-<name>-plugin}). | |
| * The properties file uses those same keys. |
a1bc79d to
c286d21
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after c286d21166 (rename properties version.maven-*-plugin → lifecycle.*-plugin, move versions-update profile from impl/maven-core/pom.xml to root pom.xml).
Status of prior findings:
| Finding | Status |
|---|---|
github.token regression (reverted to secrets.GH_TOKEN) |
✅ Resolved — GH_TOKEN: ${{ secrets.GH_TOKEN }} present |
SHA pins (actions/checkout, actions/setup-java) |
✅ Resolved |
fail-fast: false |
✅ Resolved |
--force-with-lease → --force |
✅ Resolved |
versions-maven-plugin 2.22.0 |
✅ Resolved |
Filter chain consistency (lifecycle.* end-to-end) |
✅ Resolved — plugin-versions.properties, PluginVersions.java key, and pom.xml properties all consistent |
Two issues remain.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| * <p> | ||
| * Versions are read from {@code plugin-versions.properties}, which is filtered | ||
| * at build time from POM properties ({@code version.maven-<name>-plugin}). | ||
| * The properties file uses {@code lifecycle.<name>-plugin} keys. |
There was a problem hiding this comment.
🔧 (nit) Stale Javadoc on the preceding line. The added line 30 correctly documents the lifecycle.<name>-plugin keys used in the properties file. But line 29 still says the values are filtered from POM properties {@code version.maven-<name>-plugin} — which no longer exist on master after this rename. Lines 29–30 now contradict each other: line 29 says the source is version.maven-*, line 30 says lifecycle.*.
Fix line 29 to match:
| * The properties file uses {@code lifecycle.<name>-plugin} keys. | |
| * at build time from POM properties ({@code lifecycle.maven-<name>-plugin}). | |
| * The properties file uses {@code lifecycle.<name>-plugin} keys. |
|
This leg has never produced a PR and never will under the current setup. Fix options:
Option 1 is the safer immediate fix — it avoids touching the release branch and makes the actual behavior explicit. This comment was generated by an AI agent, Hermès on behalf of @gnodet. |
- Pin actions/checkout and actions/setup-java to SHA (same as maven.yml) - Replace peter-evans/create-pull-request with gh pr create + git push - Switch to secrets.GH_TOKEN so created PRs trigger CI - Move write permissions to job level (workflow-level: contents: read) - Add fail-fast: false to matrix strategy - Use -P?versions-update to make profile optional on maven-4.0.x - Bump versions-maven-plugin 2.18.0 -> 2.22.0 - Fix grep pattern to match lifecycle.* properties - Fix plugin-versions.properties: lifecycle.* keys + lifecycle.* values - Fix plugin-versions.properties comment
c286d21 to
c6f066c
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after c6f066cb (address review comments — SHA pins, replace peter-evans action, secrets.GH_TOKEN, job-level permissions, fail-fast: false, -P?versions-update, bump versions-maven-plugin 2.22.0, fix grep pattern, fix plugin-versions.properties keys+values+comment).
Status of prior findings:
| Finding | Status |
|---|---|
--force-with-lease without remote tracking ref |
✅ Resolved — plain --force (line 76) |
Spurious backslash in --body |
✅ Resolved — \\\`` in raw YAML = `` in bash double-quoted string = literal backtick; renders correctly in GitHub Markdown |
pom.xml comment-to-code mismatch (toolbox vs versions) |
✅ Resolved — workflow now runs versions:update-properties, comment is accurate |
maven-4.0.x matrix leg is a permanent silent no-op |
❌ Still unresolved — see below |
One issue remains (unresolved since the first review, raised by @cstamas, @ascheman, and every prior review):
The maven-4.0.x leg will never produce a PR. -P?versions-update correctly prevents a build failure when the profile is absent (good fix) — but the root problem is different: maven-4.0.x's impl/maven-core/pom.xml still uses version.maven-*-plugin property names. The workflow passes -DincludeProperties="lifecycle.maven-*-plugin,..." — those property names do not exist in the maven-4.0.x POM. versions:update-properties finds nothing to update, git diff --quiet impl/maven-core/pom.xml is always true, the step exits with "No updates found" every single run. The maven-4.0.x leg consumes CI minutes weekly for zero benefit.
Two options:
- Restrict the matrix to
[master]until thelifecycle.*rename is backported tomaven-4.0.x(simpler, safer for the release branch) - Backport the
lifecycle.*property rename tomaven-4.0.xand add theversions-updateprofile there too
Option 1 is the lower-risk immediate fix — it makes the actual behavior explicit and avoids touching the release branch.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| branch: [master, maven-4.0.x] |
There was a problem hiding this comment.
maven-4.0.x matrix leg is a permanent silent no-op.
-P?versions-update prevents a build failure when the profile is absent on maven-4.0.x — but the core issue is a property name mismatch: maven-4.0.x's impl/maven-core/pom.xml uses version.maven-*-plugin property names, while the workflow passes -DincludeProperties="lifecycle.maven-clean-plugin,...". Those lifecycle.* properties do not exist on that branch. versions:update-properties has nothing to update, git diff --quiet is always true, and the leg exits "No updates found" every weekly run without ever creating a PR.
Simplest fix — restrict to master until the rename is backported:
| branch: [master, maven-4.0.x] | |
| branch: [master] |
Alternatively, backport the lifecycle.* rename to maven-4.0.x and add the versions-update profile there too (more work, but gives automated updates for the 4.0.x release branch).
…ions (maven-4.0.x) Backport of #13166 to `maven-4.0.x`. Adds the `versions-update` profile in `pom.xml` and the `.github/workflows/update-lifecycle-plugins.yml` workflow that runs `toolbox:plugin-versions` weekly to keep the 13 Maven lifecycle plugin versions in `impl/maven-core/pom.xml` up to date. - Rename lifecycle plugin version properties from `version.maven-*-plugin` to `lifecycle.*-plugin` in `impl/maven-core/pom.xml` - Update `plugin-versions.properties` keys and values to `lifecycle.*-plugin` - Update `PluginVersions.java` to use `lifecycle.` prefix and short names - Add `versions-update` profile to root `pom.xml` - Add `.github/workflows/update-lifecycle-plugins.yml`
|
@gnodet Please assign appropriate label to PR according to the type of change. |
Adds a GitHub Actions workflow that runs weekly on both
masterandmaven-4.0.xto keep the 13 Maven lifecycle plugin versions inimpl/maven-core/pom.xmlup to date.The workflow uses
versions:update-propertieswith theversions-updateprofile, which declares theversion.maven-*-pluginproperties and their pluginManagement mappings. A PR is opened automatically when updates are found.