SC-51500 Skip Maven version update when pom.xml is absent - #315
Conversation
Add a pom.xml existence check to config-maven before invoking set_maven_project_version.sh, mirroring the existing package.json guard in config-npm. Repos without a root pom.xml no longer fail during CI setup when config-maven runs.
There was a problem hiding this comment.
Pull request overview
Updates the config-maven composite action to avoid failing (or doing unnecessary work) in repositories that don’t have a pom.xml in the configured working directory, matching the existing config-npm “check manifest before version bump” behavior.
Changes:
- Add a
Check for pom.xmlstep that records whetherpom.xmlexists ininputs.working-directory. - Gate the Maven version update step so it only runs when
pom.xmlis present (or when the action is re-entered withskip=true).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Julien Carsique <julien.carsique@sonarsource.com>
|
Code Review ✅ ApprovedPrevents Maven version updates in repositories lacking a pom.xml by adding an existence check before execution. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |



Summary
Check for pom.xmlstep toconfig-mavenbefore the version update stepset_maven_project_version.shwhenpom.xmlexists (or when the action is re-entered withskip=true)config-npmguard forpackage.jsonTest plan
config-mavenin a repo with a rootpom.xml— version update should still runconfig-mavenin a repo without a rootpom.xml— should log skip message and not fail