From 7261ad0e18cebc9ae1e4f28fc2dc868c2da16cda Mon Sep 17 00:00:00 2001 From: Rostislav Svoboda Date: Wed, 19 Jul 2023 10:47:20 +0200 Subject: [PATCH] Error message when re-augmenting non-mutable Quarkus application --- .../java/io/quarkus/bootstrap/runner/QuarkusEntryPoint.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/QuarkusEntryPoint.java b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/QuarkusEntryPoint.java index ff651ae055547..0afc6b6ec1de0 100644 --- a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/QuarkusEntryPoint.java +++ b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/QuarkusEntryPoint.java @@ -68,6 +68,11 @@ private static void doRun(Object args) throws IOException, ClassNotFoundExceptio private static void doReaugment(Path appRoot) throws IOException, ClassNotFoundException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { + if (!Files.exists(appRoot.resolve(LIB_DEPLOYMENT_DEPLOYMENT_CLASS_PATH_DAT))) { + System.out.println("[ERROR] Re-augmentation was requested, " + + "but the application wasn't built with 'quarkus.package.type=mutable-jar'"); + return; + } try (ObjectInputStream in = new ObjectInputStream( Files.newInputStream(appRoot.resolve(LIB_DEPLOYMENT_DEPLOYMENT_CLASS_PATH_DAT)))) { List paths = (List) in.readObject();