From 060b6a26d6f9084fabeae68c37b336787a3a27dc Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Mon, 23 Dec 2024 18:04:58 -0800 Subject: [PATCH] Split on .jar for sub folder prefix. Signed-off-by: Finn Carroll --- .../org/opensearch/gradle/precommit/ThirdPartyAuditTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java index 4af46a7f9839f..6842f0e541abe 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java @@ -313,7 +313,7 @@ private Set extractJars(Set jars) { getProject().delete(jarExpandDir); jars.forEach(jar -> { - String jarPrefix = jar.getName().split("[-.]")[0]; + String jarPrefix = jar.getName().replace(".jar", ""); File jarSubDir = new File(jarExpandDir, jarPrefix); extractedJars.add(jarSubDir); FileTree jarFiles = getProject().zipTree(jar);