From ffa445ed9d8a961983883a64fb9000c7f6fff003 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Mon, 23 Dec 2024 17:51:58 -0800 Subject: [PATCH] Change regex to split on '-'/'.'. Ignore version. 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 78304a4c7704d..4af46a7f9839f 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().replaceAll("-\\d+\\.\\d+\\.\\d+\\.jar$", ""); + String jarPrefix = jar.getName().split("[-.]")[0]; File jarSubDir = new File(jarExpandDir, jarPrefix); extractedJars.add(jarSubDir); FileTree jarFiles = getProject().zipTree(jar);