From 9d71dc260bb7c8898eb28f07a8ed13e3974005ad Mon Sep 17 00:00:00 2001 From: Bartosz Spyrko-Smietanko Date: Mon, 25 Mar 2024 11:36:28 +0000 Subject: [PATCH] [WFGP-276] Check if the artifact is a ZIP archive before extracting schemas --- .../main/java/org/wildfly/galleon/plugin/WfInstallPlugin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/galleon-plugins/src/main/java/org/wildfly/galleon/plugin/WfInstallPlugin.java b/galleon-plugins/src/main/java/org/wildfly/galleon/plugin/WfInstallPlugin.java index 754b05ec..bd1f1e5a 100644 --- a/galleon-plugins/src/main/java/org/wildfly/galleon/plugin/WfInstallPlugin.java +++ b/galleon-plugins/src/main/java/org/wildfly/galleon/plugin/WfInstallPlugin.java @@ -1089,7 +1089,9 @@ public void copyArtifact(CopyArtifact copyArtifact, PackageRuntime pkg) throws P } IoUtils.copy(jarSrc, jarTarget); } - if(schemaGroups.contains(artifact.getGroupId())) { + // only attempt to extract schemas if the artifact is a zip archive + if(schemaGroups.contains(artifact.getGroupId()) + && (artifact.getExtension().equals("jar") || artifact.getExtension().equals("zip"))) { extractSchemas(jarSrc); } } catch (IOException e) {