Skip to content

change hibernate-validator and expressly to test scope #543

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
stevehu opened this issue Mar 4, 2025 · 2 comments
Closed

change hibernate-validator and expressly to test scope #543

stevehu opened this issue Mar 4, 2025 · 2 comments

Comments

@stevehu
Copy link

stevehu commented Mar 4, 2025

What would you like to be added:
Those two dependencies are not needed in runtime and they are only used by the test cases in api and impl modules.

Why is this needed:
By moving the two dependencies to the test scope, we can minimize the dependency for api and impl modules.

If this is agreed, I can submit a PR to resolve it. Thanks a lot for providing the Java sdk and reference implementation.

stevehu added a commit to stevehu/sdk-java that referenced this issue Mar 4, 2025
@fjtirado
Copy link
Collaborator

fjtirado commented Mar 4, 2025

These dependencies are "needed" (they can be replaced by a diferent implementation of Jakarta Validation API) at runtime by any project using the SDK. When a workflow is read into memory, the jakarta validation annotation requires an underlying validation runtime to be present there.
However, these dependencies are not required at compilation time, so a PR is indeed needed to change the scope to runtime. I added comments to the PR you opened.

@stevehu
Copy link
Author

stevehu commented Mar 4, 2025

@fjtirado Thanks a lot for the clarification. I realized that Jakarta Validation API doesn't have its implementation and it requires the hibernate-validator as it is the only reference implementation available. Given that, it is a good idea to keep the current dependency. I will close the PR.

@stevehu stevehu closed this as completed Mar 4, 2025
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Mar 5, 2025
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
fjtirado added a commit that referenced this issue Mar 5, 2025
[Fix #543] Not compiled dependencies should be runtime
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants