From bc6bae009d0da4b95918b2a78b58413aeee835f6 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 64535de4..0f857b1e 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 @@ -1084,7 +1084,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) {