From 5e6f02d0302392fe543540e1acc7f77353b72d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20Li=C5=A1ka?= Date: Thu, 11 May 2023 12:28:51 +0200 Subject: [PATCH] init task name starts with service name --- .../src/main/java/io/quarkus/flyway/FlywayProcessor.java | 5 +++-- .../mongodb/deployment/LiquibaseMongodbProcessor.java | 5 +++-- .../io/quarkus/liquibase/deployment/LiquibaseProcessor.java | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java b/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java index ce3fa9db00e21..aa87971582475 100644 --- a/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java +++ b/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java @@ -46,6 +46,7 @@ import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Produce; import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.ApplicationInfoBuildItem; import io.quarkus.deployment.builditem.CombinedIndexBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; import io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem; @@ -221,9 +222,9 @@ public ServiceStartBuildItem startActions(FlywayRecorder recorder, } @BuildStep - public InitTaskBuildItem configureInitTask() { + public InitTaskBuildItem configureInitTask(ApplicationInfoBuildItem app) { return InitTaskBuildItem.create() - .withName("flyway-init") + .withName(app.getName() + "-flyway-init") .withTaskEnvVars(Map.of("QUARKUS_INIT_AND_EXIT", "true", "QUARKUS_FLYWAY_ENABLED", "true")) .withAppEnvVars(Map.of("QUARKUS_FLYWAY_ENABLED", "false")) .withSharedEnvironment(true) diff --git a/extensions/liquibase-mongodb/deployment/src/main/java/io/quarkus/liquibase/mongodb/deployment/LiquibaseMongodbProcessor.java b/extensions/liquibase-mongodb/deployment/src/main/java/io/quarkus/liquibase/mongodb/deployment/LiquibaseMongodbProcessor.java index 462e0d5f6d61d..0bd1ba82b3790 100644 --- a/extensions/liquibase-mongodb/deployment/src/main/java/io/quarkus/liquibase/mongodb/deployment/LiquibaseMongodbProcessor.java +++ b/extensions/liquibase-mongodb/deployment/src/main/java/io/quarkus/liquibase/mongodb/deployment/LiquibaseMongodbProcessor.java @@ -30,6 +30,7 @@ import io.quarkus.deployment.annotations.Consume; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.ApplicationInfoBuildItem; import io.quarkus.deployment.builditem.CombinedIndexBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; import io.quarkus.deployment.builditem.InitTaskBuildItem; @@ -254,9 +255,9 @@ ServiceStartBuildItem startLiquibase(LiquibaseMongodbRecorder recorder, } @BuildStep - public InitTaskBuildItem configureInitTask() { + public InitTaskBuildItem configureInitTask(ApplicationInfoBuildItem app) { return InitTaskBuildItem.create() - .withName("liquibase-mongodb-init") + .withName(app.getName() + "-liquibase-mongodb-init") .withTaskEnvVars( Map.of("QUARKUS_INIT_AND_EXIT", "true", "QUARKUS_LIQUIBASE_MONGODB_ENABLED", "true")) .withAppEnvVars(Map.of("QUARKUS_LIQUIBASE_MONGODB_ENABLED", "false")) diff --git a/extensions/liquibase/deployment/src/main/java/io/quarkus/liquibase/deployment/LiquibaseProcessor.java b/extensions/liquibase/deployment/src/main/java/io/quarkus/liquibase/deployment/LiquibaseProcessor.java index 8666bf778b0f0..b1e35293535f4 100644 --- a/extensions/liquibase/deployment/src/main/java/io/quarkus/liquibase/deployment/LiquibaseProcessor.java +++ b/extensions/liquibase/deployment/src/main/java/io/quarkus/liquibase/deployment/LiquibaseProcessor.java @@ -41,6 +41,7 @@ import io.quarkus.deployment.annotations.Consume; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.ApplicationInfoBuildItem; import io.quarkus.deployment.builditem.CombinedIndexBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; import io.quarkus.deployment.builditem.IndexDependencyBuildItem; @@ -318,9 +319,9 @@ ServiceStartBuildItem startLiquibase(LiquibaseRecorder recorder, } @BuildStep - public InitTaskBuildItem configureInitTask() { + public InitTaskBuildItem configureInitTask(ApplicationInfoBuildItem app) { return InitTaskBuildItem.create() - .withName("liquibase-init") + .withName(app.getName() + "-liquibase-init") .withTaskEnvVars(Map.of("QUARKUS_INIT_AND_EXIT", "true", "QUARKUS_LIQUIBASE_ENABLED", "true")) .withAppEnvVars(Map.of("QUARKUS_LIQUIBASE_ENABLED", "false")) .withSharedEnvironment(true)