I have followed this guide from netbeans: build from source

Unfortunately on running ant build, as it tries to download from maven central repository it uses an url that seems outdated, the new url appers to be metioned on new url. Where do I make the changes, or could it be a problem with my system?

error (some urls omitted):

Buildfile: /home/teste/Downloads/netbeans-11.2-source/build.xml








[downloadbinaries] Could not download 16398550402B27F81CD0D508CEF54B3E47A4A6DA-apache-rat-0.12.jar to /home/teste/.hgexternalcache/16398550402B27F81CD0D508CEF54B3E47A4A6DA-apache-rat-0.12.jar: java.io.IOException: Cannot connect to http://central.maven.org/maven2/org/apache/rat/apache-rat/0.12/apache-rat-0.12.jar

/home/teste/Downloads/netbeans-11.2-source/nbbuild/build.xml:71: Failed to download binaries - see log message for the detailed reasons.

nmap also complains on not finding a target on this maven url as well,so it seems to really be gone.

either way, if it is possible to get the files in a way that they get used by the build it also would solve my issues


vim ./nbbuild/antsrc/org/netbeans/nbbuild/extlibs/DownloadBinaries.java

163 private byte[] mavenFile(MavenCoordinate mc) throws IOException { 164 String cacheName = mc.toMavenPath(); 165 File local = new File(new File(new File(new File(System.getProperty("user.home")), ".m2"), "repository"), ca cheName.replace('/', File.separatorChar)); 166 final String url; 167 if (local.exists()) { 168 url = local.toURI().toString(); 169 } else { 170 url = "https://repo1.maven.org/maven2/" + cacheName; 171 } 172 URL u = new URL(url); 173 return downloadFromServer(u); 174 }

change line 170

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.