Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maven mirror generator action. #6766

Merged
merged 1 commit into from Dec 8, 2023

Conversation

mbien
Copy link
Member

@mbien mbien commented Nov 29, 2023

  • None of the preset mirrors for maven central exist anymore, this updates the preset to the last known public mirrors and tweaks the UI a bit.
  • Fixed possible NPE when the central list is checked before NotificationLineSupport was attached.

test:
open settings.xml via Project Files, hit alt+insert -> Mirror...

image

@mbien mbien added Maven [ci] enable "build tools" tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Nov 29, 2023
@mbien mbien added this to the NB21 milestone Nov 29, 2023
@mbien
Copy link
Member Author

mbien commented Dec 1, 2023

I asked on the apache slack maven channel about an updated list of public mirrors which caused a little discussion between maven devs and also central maintainers. This lead to an update of the meta xml, which is now listing the remaining public mirrors correctly:
https://repo.maven.apache.org/maven2/.meta/repository-metadata.xml

So we could collect the mirror info from the repo xml, but since its just 3 urls it is probably ok to keep them hardcoded for now without over engineering it.

@mbien
Copy link
Member Author

mbien commented Dec 6, 2023

would like to start to merge some of the smaller maven PRs this weekend, assuming they are reviewed to shrink the queue a bit.

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks sane to me.

None of the preset mirrors for maven central exist anymore, this
updates the preset to the last known public mirrors and tweaks the UI
a bit.

Fixed possible NPE when the central list is checked before
NotificationLineSupport was attached.
}
});
checkCentral();
Copy link
Member Author

Choose a reason for hiding this comment

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

@sdedic to answer your question from the other PR, the NPE was here:

nls.setErrorMessage(NbBundle.getMessage(NewProfilePanel.class, "ERR_SameMirrorId"));

nls was null. This can happen when the mirror already exists and the user opens the dialog again, the check will run right from the constructor, nls is set post-construction and is therefore still null. By moving the check into addNotify() this is avoided.

@mbien mbien merged commit ea7b98a into apache:master Dec 8, 2023
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Maven [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants