GeezerVison is showing github.com — chore: refactor maven autodiscovery manifest template by olblak · Pull Request #10989 · updatecli/updatecli
Conversation
olblak
commented
Oct 22, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
This pullrequest is a refactoring in preparation of upcoming maven pullrequest
Test
To test this pull request, you can run the following commands:
cd pkg/plugins/autodiscovery/maven
go test
Additional Information
Checklist
- I have updated the documentation via pull request in website repository.
- I have tested this pull request manually with a custom Updatecli build and it works as expected.
Tradeoff
Potential improvement
Summary by CodeRabbit
- Bug Fixes
- Maven dependency and parent POM manifests now apply configured version filters consistently.
- Maven projects without repositories can be discovered without adding a repository section to their manifests.
- A manifest that cannot be rendered is skipped, while discovery continues for other dependencies or parent POMs, so one rendering issue does not prevent other results from being found.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The versionfilter of the generated source was only written when the
pom.xml or settings.xml declares repositories. Without them, the source
uses Maven Central and bumped to the latest version, whatever the
version filter, major versions included.
Signed-off-by: Olblak <[email protected]>
The dependency and parent pom crawlers declared the same anonymous
template parameters, computed the source version filter the same way and
parsed the constant manifest template for every dependency. Share a named
manifestTemplateParams type and a renderManifest method computing the
version filter, and parse the template once. The generated manifests are
unchanged.
Signed-off-by: Olblak <[email protected]>
coderabbitai
Bot
commented
Oct 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Important
Review skipped
Review was skipped as selected files did not have any reviewable changes.
⚙️ Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
1fa6676d-e7f3-42f7-8043-10b2f2fec490
📥 Commits
-
Reviewing files that changed from the base of the PR and between 558eb91 and cb3e4d6.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
dcd0e58e-cdd3-4a43-829f-a35e27ef1f22
📥 Commits
-
Reviewing files that changed from the base of the PR and between a681921 and 369dbd8.
📒 Files selected for processing: 3
-
pkg/plugins/autodiscovery/maven/dependency.go
pkg/plugins/autodiscovery/maven/dependencyParentPom.go
pkg/plugins/autodiscovery/maven/manifestTemplate.go
🚧 Files skipped from review as they are similar to previous changes: 2
-
- pkg/plugins/autodiscovery/maven/dependency.go
- pkg/plugins/autodiscovery/maven/dependencyParentPom.go
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
📝 Walkthrough
-
Maven dependency and parent-POM manifest generation now uses a shared renderer for template execution and version-filter parameters. A new test checks discovery for a Maven project without repositories.
Changes: Maven manifest rendering
| Layer / File(s) |
Summary |
Shared template rendering pkg/plugins/autodiscovery/maven/manifestTemplate.go |
The renderer parses the template once, sets version-filter values, and returns template parsing or execution errors. The template’s extra end was removed. |
Discovery integration and test pkg/plugins/autodiscovery/maven/dependency.go, pkg/plugins/autodiscovery/maven/dependencyParentPom.go, pkg/plugins/autodiscovery/maven/main_test.go, pkg/plugins/autodiscovery/maven/testdata/norepository/pom.xml |
Dependency and parent-POM generation delegate rendering to m.renderManifest and skip entries when rendering fails. The test checks that discovery without repositories produces one manifest, omits the repositories field, and retains the configured version filter. |
Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Suggested reviewers: kevinleturc
Merge Risk: ⚪ Minimal · up to 369db
-
No concrete merge-blocking risk was established for this refactoring.
Pre-merge checks: 4 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
Passed checks: 4 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly describes the Maven autodiscovery manifest-template refactoring. |
| Description check |
 |
The description includes the change summary, test command, checklist, tradeoff, and potential-improvement sections. It does not include the expected issue reference or test results, but it is otherwis… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Description check
-
Explanation
The description includes the change summary, test command, checklist, tradeoff, and potential-improvement sections. It does not include the expected issue reference or test results, but it is otherwise sufficiently complete.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
-
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
4 open issues
What changed in this PR
Refactors Maven autodiscovery manifest rendering to centralize template execution and improve handling of repository-less projects ahead of upcoming Maven-related changes.
Changes:
- Parse the manifest Go template once and reuse it (instead of parsing per dependency/parent POM).
- Centralize manifest rendering (including version filter adjustments) into
renderManifest.
- Add test coverage and testdata for discovery when no repositories are configured.
| File |
Description |
| pkg/plugins/autodiscovery/maven/manifestTemplate.go |
Introduces shared parsed template, parameter struct, and a single render function. |
| pkg/plugins/autodiscovery/maven/dependency.go |
Switches dependency manifest generation to the shared renderer. |
| pkg/plugins/autodiscovery/maven/dependencyParentPom.go |
Switches parent POM manifest generation to the shared renderer. |
| pkg/plugins/autodiscovery/maven/main_test.go |
Adds coverage for discovery without repositories and version filter application. |
| pkg/plugins/autodiscovery/maven/testdata/norepository/pom.xml |
Adds a repository-less POM fixture for testing. |
Review effort: Lite
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|