From 4fa786c884566840e25985fec0a71c0ce380fb99 Mon Sep 17 00:00:00 2001 From: Moti Asayag Date: Mon, 20 Mar 2023 21:31:52 +0200 Subject: [PATCH] Decouple examples from service The purpose of this PR is to decouple the user's workflows from being built into the workflow-service by using the PropertiesLauncher as the Start-Class of the application. Extra dependencies can be provided via system property `loader.path`. In addition, to satisfy all runtime dependencies, the workflow-example is being built with a plugin to include all of its dependencies in a single jar. Signed-off-by: Moti Asayag --- workflow-examples/pom.xml | 19 +++++++++++++++++++ workflow-examples/start_workflow_service.sh | 4 +++- workflow-service/pom.xml | 8 +++----- workflow-service/start_workflow_service.sh | 4 +++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/workflow-examples/pom.xml b/workflow-examples/pom.xml index 3bd71729f..e9e4a912a 100644 --- a/workflow-examples/pom.xml +++ b/workflow-examples/pom.xml @@ -112,6 +112,25 @@ html + + org.apache.maven.plugins + maven-assembly-plugin + 3.5.0 + + + jar-with-dependencies + + + + + assemble-all + package + + single + + + + \ No newline at end of file diff --git a/workflow-examples/start_workflow_service.sh b/workflow-examples/start_workflow_service.sh index 913a7cb81..84d78fa2c 100755 --- a/workflow-examples/start_workflow_service.sh +++ b/workflow-examples/start_workflow_service.sh @@ -1 +1,3 @@ -java -jar -Dspring.profiles.active=local ../workflow-service/target/workflow-service-1.0.3-SNAPSHOT.jar +java -jar -Dspring.profiles.active=local \ + -Dloader.path=../workflow-examples/target/workflow-examples-1.0.3-SNAPSHOT-jar-with-dependencies.jar \ + ../workflow-service/target/workflow-service-1.0.3-SNAPSHOT.jar diff --git a/workflow-service/pom.xml b/workflow-service/pom.xml index 579b38d4f..05ee2d29e 100644 --- a/workflow-service/pom.xml +++ b/workflow-service/pom.xml @@ -126,11 +126,6 @@ workflow-engine ${revision} - - dev.parodos - workflow-examples - ${revision} - @@ -214,6 +209,9 @@ org.springframework.boot spring-boot-maven-plugin ${springframework.boot.version} + + ZIP + diff --git a/workflow-service/start_workflow_service.sh b/workflow-service/start_workflow_service.sh index 5a7a0fd89..7c0f25abb 100755 --- a/workflow-service/start_workflow_service.sh +++ b/workflow-service/start_workflow_service.sh @@ -1 +1,3 @@ -java -jar -Dspring.profiles.active=local target/workflow-service-1.0.3-SNAPSHOT.jar +java -jar -Dspring.profiles.active=local \ + -Dloader.path=../workflow-examples/target/workflow-examples-1.0.3-SNAPSHOT-jar-with-dependencies.jar \ + target/workflow-service-1.0.3-SNAPSHOT.jar \ No newline at end of file