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 76d3d198..a02c9cd9 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; @@ -38,7 +39,8 @@ public VertxFileDownloader(Vertx vertx) { .setKeepAlive(true)); } - 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; @@ -56,6 +58,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)) @@ -73,5 +81,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 4bb596f7..c6d0b036 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 3.12.0 1.0.0 3.26.3 - 1.15.0 + 1.15.1 @@ -48,7 +48,7 @@ Andy Damevin ia3andy@gmail.com Red Hat - http://www.redhat.com + https://www.redhat.com Emil Lefkof @@ -56,12 +56,6 @@ KSM Technology https://www.ksmpartners.com/ - - Shivam Sharma - meshivam81@gmail.com - Hyperfoil - https://github.com/Hyperfoil - @@ -114,4 +108,4 @@ - + \ No newline at end of file