Skip to content

#1910: create mvnd url updater#1921

Open
MarvMa wants to merge 4 commits into
devonfw:mainfrom
MarvMa:feature/#1910-create-mvndUrlUpdater
Open

#1910: create mvnd url updater#1921
MarvMa wants to merge 4 commits into
devonfw:mainfrom
MarvMa:feature/#1910-create-mvndUrlUpdater

Conversation

@MarvMa
Copy link
Copy Markdown
Contributor

@MarvMa MarvMa commented May 12, 2026

This PR fixes #1910

Implemented changes:

  • Added MvndUrlUpdater class with filtering
  • Added Tests

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board May 12, 2026
@MarvMa MarvMa self-assigned this May 12, 2026
@MarvMa MarvMa added enhancement New feature or request urls ide-urls repo and related processes and features mvn related to apache maven build tool labels May 12, 2026
@MarvMa MarvMa moved this from 🆕 New to Team Review in IDEasy board May 12, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 12, 2026

Coverage Report for CI Build 26017516197

Warning

No base build found for commit 9847d70 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 70.708%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15501
Covered Lines: 11422
Line Coverage: 73.69%
Relevant Branches: 6932
Covered Branches: 4440
Branch Coverage: 64.05%
Branches in Coverage %: Yes
Coverage Strength: 3.12 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Contributor

@satorus satorus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, tested it on WSL and the urls are updated in my local ide-urls repo. Nice work!

@hohwille hohwille added this to the release:2026.05.001 milestone May 18, 2026
Copy link
Copy Markdown
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the status is still Team-Review I am not sure if this was ready for final review but I guessed so from @satorus comment...
@MarvMa thanks for your PR. Looks good to me.
I left some design notes for improvement but nothing wrong and all good. 👍

@Override
public String mapVersion(String version) {
// Accept pre-release versions (rc, beta, alpha, etc.) first
if (version.contains("-rc") || version.contains("-beta") || version.contains("-alpha")) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely we want to include the release candidates but should IDEasy really encourage users to use alpha (or beta) releases?

protected void addVersion(UrlVersion urlVersion) {
// Support both regular releases and pre-releases (e.g., 2.x versions)
// This allows users to test the latest versions before they become stable
String baseUrl = getDownloadBaseUrl() + "${version}/maven-mvnd-${version}-";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not aware that getDownloadBaseUrl() guarantees to include a trailing slash.
For paths and URLs it is typically best practice to omit a trailing slash but if you append start with s slash.

String basePath = "/foo/bar";
String path = basePath + "/folder/file.ext";

Just a comment for the record. If this is currently that way, then you did nothing wrong.
Lets simply set this to resolved then and consider a separate PR for a potential cleanup but do not include general cleanups into this PR that should focus on mvnd.

Comment on lines +859 to +864
if (isVersionFiltered()) {
if (vLower.contains("alpha") || vLower.contains("beta") || vLower.contains("dev") || vLower.contains("snapshot") || vLower.contains("preview")
|| vLower.contains("test") || vLower.contains("tech-preview") //
|| vLower.contains("-pre") || vLower.startsWith("ce-") || vLower.contains("-next") || vLower.contains("-rc")
// vscode nonsense
|| vLower.startsWith("bad") || vLower.contains("vsda-") || vLower.contains("translation/") || vLower.contains("-insiders")) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not instead moving the condition to isFilterVersion(String version) so you can override it?
BTW: You are overriding the entire method so this change and the new isVersionFiltered() method is kind of pointless here.

@github-project-automation github-project-automation Bot moved this from Team Review to 👀 In review in IDEasy board May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request mvn related to apache maven build tool urls ide-urls repo and related processes and features

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Create MvndUrlUpdater

4 participants