You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2023/11/29 18:44:13 UTC
[PR] Update maven mirror generator action. [netbeans]
mbien opened a new pull request, #6766:
URL: https://github.com/apache/netbeans/pull/6766
- 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...`

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Update maven mirror generator action. [netbeans]
Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on code in PR #6766:
URL: https://github.com/apache/netbeans/pull/6766#discussion_r1419965487
##########
java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java:
##########
@@ -179,21 +174,18 @@ private void checkCentral() {
String sel = (String)comMirrorOf.getSelectedItem();
urlmodel.removeAllElements();
if (RepositorySystem.DEFAULT_REMOTE_REPO_ID.equals(sel)) {
- //see http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories
- // for a list of central mirrors.
- //TODO might be worth to externalize somehow.
- urlmodel.addElement("http://mirrors.ibiblio.org/pub/mirrors/maven2"); //NOI18N
- urlmodel.addElement("http://www.ibiblio.net/pub/packages/maven2");//NOI18N
- urlmodel.addElement("http://ftp.cica.es/mirrors/maven2");//NOI18N
- urlmodel.addElement("http://repo1.sonatype.net/maven2");//NOI18N
- urlmodel.addElement("http://repo.exist.com/maven2");//NOI18N
- urlmodel.addElement("http://mirrors.redv.com/maven2");//NOI18N
- urlmodel.addElement("http://mirrors.dotsrc.org/maven2");//NOI18N
+ // according to devs involved with maven and maven central, these are the only public mirrors left for central at this time
Review Comment:
I'd just add the link to the ultimate source of truth (https://repo.maven.apache.org/maven2/.meta/repository-metadata.xml) in the comments for future reference
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Update maven mirror generator action. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #6766:
URL: https://github.com/apache/netbeans/pull/6766#discussion_r1419976494
##########
java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java:
##########
@@ -179,21 +174,18 @@ private void checkCentral() {
String sel = (String)comMirrorOf.getSelectedItem();
urlmodel.removeAllElements();
if (RepositorySystem.DEFAULT_REMOTE_REPO_ID.equals(sel)) {
- //see http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories
- // for a list of central mirrors.
- //TODO might be worth to externalize somehow.
- urlmodel.addElement("http://mirrors.ibiblio.org/pub/mirrors/maven2"); //NOI18N
- urlmodel.addElement("http://www.ibiblio.net/pub/packages/maven2");//NOI18N
- urlmodel.addElement("http://ftp.cica.es/mirrors/maven2");//NOI18N
- urlmodel.addElement("http://repo1.sonatype.net/maven2");//NOI18N
- urlmodel.addElement("http://repo.exist.com/maven2");//NOI18N
- urlmodel.addElement("http://mirrors.redv.com/maven2");//NOI18N
- urlmodel.addElement("http://mirrors.dotsrc.org/maven2");//NOI18N
+ // according to devs involved with maven and maven central, these are the only public mirrors left for central at this time
Review Comment:
well, the ultimate source of truth was completely wrong until we had the discussion on apache slack (not one link worked) :)
going to add the link to the updated meta xml but I don't expect anyone starting to mirror central any time soon (would be great to get more mirrors though - surprised that there is no university doing this, its only ~40 TB which is still doable)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Update maven mirror generator action. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #6766:
URL: https://github.com/apache/netbeans/pull/6766#issuecomment-1843771509
would like to start to merge some of the smaller maven PRs this weekend, assuming they are reviewed to shrink the queue a bit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Update maven mirror generator action. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #6766:
URL: https://github.com/apache/netbeans/pull/6766#discussion_r1419992394
##########
java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java:
##########
@@ -135,18 +133,14 @@ public void changedUpdate(DocumentEvent e) {
comUrl.setModel(urlmodel);
btnLink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
- btnLink.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- try {
- URL link = new URL("http://maven.apache.org/guides/mini/guide-mirror-settings.html"); //NOI18N
- HtmlBrowser.URLDisplayer.getDefault().showURL(link);
- } catch (MalformedURLException ex) {
- Exceptions.printStackTrace(ex);
- }
+ btnLink.addActionListener(e -> {
+ try {
+ URL link = new URL("http://maven.apache.org/guides/mini/guide-mirror-settings.html"); //NOI18N
+ HtmlBrowser.URLDisplayer.getDefault().showURL(link);
+ } catch (MalformedURLException ex) {
+ Exceptions.printStackTrace(ex);
}
});
- checkCentral();
Review Comment:
@sdedic to answer your question from the other PR, the NPE was here:
https://github.com/apache/netbeans/blob/a9845e3070f96255d000963ef7039e4a5b3165ad/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java#L167
`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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Update maven mirror generator action. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #6766:
URL: https://github.com/apache/netbeans/pull/6766
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Update maven mirror generator action. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #6766:
URL: https://github.com/apache/netbeans/pull/6766#issuecomment-1836646781
the maven community (including maven central maintainers) discussed this on the apache slack maven channel, which also 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 a handful of urls it is probably ok to keep them hardcoded for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists