Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Decouple examples from service
Browse files Browse the repository at this point in the history
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 <masayag@redhat.com>
  • Loading branch information
masayag committed Mar 20, 2023
1 parent b3c4519 commit 4fa786c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
19 changes: 19 additions & 0 deletions workflow-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,25 @@
<reportFormat>html</reportFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
4 changes: 3 additions & 1 deletion workflow-examples/start_workflow_service.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 3 additions & 5 deletions workflow-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@
<artifactId>workflow-engine</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>dev.parodos</groupId>
<artifactId>workflow-examples</artifactId>
<version>${revision}</version>
</dependency>
<!-- END Parodos Library Dependencies -->
<!-- START Developer Productivity Dependencies -->
<dependency>
Expand Down Expand Up @@ -214,6 +209,9 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${springframework.boot.version}</version>
<configuration>
<layout>ZIP</layout>
</configuration>
<executions>
<execution>
<goals>
Expand Down
4 changes: 3 additions & 1 deletion workflow-service/start_workflow_service.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4fa786c

Please sign in to comment.