From 91143c7eec85f76e4e0b88bd3d6f537c25b7c385 Mon Sep 17 00:00:00 2001 From: Melloware Date: Mon, 23 Sep 2024 08:35:31 -0400 Subject: [PATCH] Fix #683: FrontEnd 1.15.1 (#771) --- .../plugins/frontend/lib/VertxFileDownloader.java | 13 ++++++++++--- pom.xml | 12 +++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/deployment/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/VertxFileDownloader.java b/deployment/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/VertxFileDownloader.java index 98943284..4d80bf1f 100644 --- a/deployment/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/VertxFileDownloader.java +++ b/deployment/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/VertxFileDownloader.java @@ -6,6 +6,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -59,7 +60,8 @@ public VertxFileDownloader(Vertx vertx) { this.webClient = WebClient.create(vertx, options); } - public void download(String downloadUrl, String destination, String userName, String password) throws DownloadException { + public void download(String downloadUrl, String destination, String userName, String password, + Map httpHeaders) throws DownloadException { System.setProperty("https.protocols", "TLSv1.2"); String fixedDownloadUrl = downloadUrl; @@ -77,6 +79,12 @@ public void download(String downloadUrl, String destination, String userName, St if (userName != null && password != null) { httpRequest.basicAuthentication(userName, password); } + if (httpHeaders != null) { + for (Map.Entry httpHeader : httpHeaders.entrySet()) { + httpRequest.putHeader(httpHeader.getKey(), httpHeader.getValue()); + } + } + final Future> future = httpRequest .expect(ResponsePredicate.SC_SUCCESS) .as(BodyCodec.pipe(destinationFile)) @@ -94,5 +102,4 @@ public void download(String downloadUrl, String destination, String userName, St throw new RuntimeException(e); } } - -} +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 539b21a8..9c8fd8c3 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 3.12.0 1.0.0 3.26.3 - 1.15.0 + 1.15.1 @@ -47,7 +47,7 @@ Andy Damevin ia3andy@gmail.com Red Hat - http://www.redhat.com + https://www.redhat.com Emil Lefkof @@ -55,12 +55,6 @@ KSM Technology https://www.ksmpartners.com/ - - Shivam Sharma - meshivam81@gmail.com - Hyperfoil - https://github.com/Hyperfoil - @@ -125,4 +119,4 @@ - + \ No newline at end of file