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

Commit

Permalink
prebuilt-tasks module must NOT depend on workflow-service-sdk
Browse files Browse the repository at this point in the history
This module (prebuilt-tasks) must not depend on `workflow-service-sdk`,
as it is already dependent on `workflow-service`. `workflow-service`
depends on `prebuilt-tasks`. Adding `workflow-service-sdk` here will
create a circular dependency, and `workflow-service` won't be able to
generate the `openapi.json` file anymore.

This commit introduces a check that will now prevent the build from succeeding if there is a dependency on workflow-service-sdk.

Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
  • Loading branch information
gciavarrini authored and openshift-merge-robot committed Aug 4, 2023
1 parent 4a541fd commit c4778ab
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions prebuilt-tasks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,36 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.3.0</version> <!-- Adjust version as needed -->
<executions>
<execution>
<id>enforce-no-unwanted-dependency</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<!--
IMPORTANT NOTE: This module (prebuilt-tasks) must not depend on workflow-service-sdk,
as it is already dependent on workflow-service. workflow-service depends on
prebuilt-tasks. Adding workflow-service-sdk here will create a circular
dependency, and workflow-service won't be able to generate the openapi.json file anymore.
-->
<exclude>dev.parodos:workflow-service-sdk</exclude>
</excludes>
</bannedDependencies>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit c4778ab

Please sign in to comment.