From 3394b6ef7c00b25ad4ad4b64ac5f879aa16e4db5 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 24 Oct 2024 22:32:51 +0200 Subject: [PATCH] eclipse downloader: When downloading sources, accept failure. --- .../eclipse/dependencies/DownloadEclipseDependencies.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/support/lombok/eclipse/dependencies/DownloadEclipseDependencies.java b/src/support/lombok/eclipse/dependencies/DownloadEclipseDependencies.java index 20b590e63..e2ef2bbea 100644 --- a/src/support/lombok/eclipse/dependencies/DownloadEclipseDependencies.java +++ b/src/support/lombok/eclipse/dependencies/DownloadEclipseDependencies.java @@ -23,7 +23,6 @@ import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; -import java.io.Closeable; import java.io.File; import java.io.FileOutputStream; import java.io.FilenameFilter; @@ -73,7 +72,12 @@ public static void main(String[] args) throws Exception { // Download artifact source int index = artifact.lastIndexOf("_"); String source = artifact.substring(0, index) + ".source" + artifact.substring(index); - downloadFile(source, pluginSource, pluginTarget); + try { + downloadFile(source, pluginSource, pluginTarget); + } catch (Exception e) { + // It's just the source; sometimes these aren't present (specifically, `org.eclipse.swt` doesn't currently appear to have the sources, at least not using the `_sources` naming scheme). Don't fail, just skip them. + System.out.println("[failed]"); + } } writeEclipseLibrary(target, eclipseVersion);