From 7a2cf555e3d0eb05e25c7eb71eed21aa1db8176a Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Tue, 22 Oct 2024 18:20:47 +0200 Subject: [PATCH] wasm gc: fix maven mojo that copies runtime --- .../java/org/teavm/maven/TeaVMCopyWebassemblyGCRuntimeMojo.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/maven/plugin/src/main/java/org/teavm/maven/TeaVMCopyWebassemblyGCRuntimeMojo.java b/tools/maven/plugin/src/main/java/org/teavm/maven/TeaVMCopyWebassemblyGCRuntimeMojo.java index 01ca99733e..fc958371bf 100644 --- a/tools/maven/plugin/src/main/java/org/teavm/maven/TeaVMCopyWebassemblyGCRuntimeMojo.java +++ b/tools/maven/plugin/src/main/java/org/teavm/maven/TeaVMCopyWebassemblyGCRuntimeMojo.java @@ -59,6 +59,7 @@ public void execute() throws MojoExecutionException { var resourceName = "org/teavm/backend/wasm/" + name + ".js"; var classLoader = TeaVMCopyWebassemblyGCRuntimeMojo.class.getClassLoader(); var output = new File(targetDirectory, runtimeFileName); + output.getParentFile().mkdirs(); try (var input = classLoader.getResourceAsStream(resourceName)) { Files.copy(input, output.toPath(), StandardCopyOption.REPLACE_EXISTING); } @@ -66,6 +67,7 @@ public void execute() throws MojoExecutionException { if (deobfuscator) { resourceName = "org/teavm/backend/wasm/deobfuscator.wasm"; output = new File(targetDirectory, deobfuscatorFileName); + output.getParentFile().mkdirs(); try (var input = classLoader.getResourceAsStream(resourceName)) { Files.copy(input, output.toPath(), StandardCopyOption.REPLACE_EXISTING); }