From 137b1fab9e7f83eb17ae01ebe73fa50fc939a559 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Wed, 1 Mar 2023 08:57:20 +0100 Subject: [PATCH] Fix distribution downloads (#17358) --- .../downloads/src/main/java/CopyDependencies.java | 8 ++++++++ distribution/downloads/src/main/resources/files | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/distribution/downloads/src/main/java/CopyDependencies.java b/distribution/downloads/src/main/java/CopyDependencies.java index 5fde9e4349..ead458ccfe 100644 --- a/distribution/downloads/src/main/java/CopyDependencies.java +++ b/distribution/downloads/src/main/java/CopyDependencies.java @@ -65,6 +65,9 @@ public class CopyDependencies { private void copyMaven(String artifactName, String destinationName) throws IOException { File artifactDir = mavenRepository.resolve(artifactName).resolve(version).toFile(); + if (!artifactDir.isDirectory()) { + throw new RuntimeException(artifactName + " (" + artifactDir + ") not found"); + } File[] files = artifactDir.listFiles((file, name) -> name.contains(".tar.gz") || name.contains(".tgz") || name.contains(".zip")); @@ -74,6 +77,11 @@ public class CopyDependencies { } private void copyNpm(String artifactName, String destinationName) throws IOException { + Path artifactPath = projectDir.resolve(artifactName); + if (!artifactPath.toFile().isFile()) { + throw new RuntimeException(artifactName + " (" + artifactPath + ") not found"); + } + Files.copy(projectDir.resolve(artifactName), targetDir.resolve(destinationName)); } diff --git a/distribution/downloads/src/main/resources/files b/distribution/downloads/src/main/resources/files index 2f3bdeacff..ff3e2ede5a 100644 --- a/distribution/downloads/src/main/resources/files +++ b/distribution/downloads/src/main/resources/files @@ -3,7 +3,6 @@ mvn:keycloak-api-docs-dist:keycloak-api-docs mvn:keycloak-jetty94-adapter-dist:keycloak-oidc-jetty94-adapter mvn:keycloak-js-adapter-npm-dist:keycloak-oidc-js-adapter -mvn:keycloak-js-admin-client:keycloak-js-admin-client mvn:keycloak-tomcat-adapter-dist:keycloak-oidc-tomcat-adapter mvn:keycloak-wildfly-adapter-dist:keycloak-oidc-wildfly-adapter