apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
543 stars 210 forks source link

Wrong value for project.root.dir property #3782

Closed fjtirado closed 3 days ago

fjtirado commented 5 days ago

Describe the bug

project.root.dir property, defined in parent pom, relies on maven.multiModuleProjectDirectory, which is not documented and might fail as explained here. It should be replaced by proper usage of Maven directory plugin

Expected behavior

No response

Actual behavior

In any enviroment where test are not invoked from kogito-runtimes root, this causes test errors in modules using this property, For example

[ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.061 s <<< FAILURE! -- in org.kie.kogito.quarkus.workflows.CallbackStateIT
[ERROR] org.kie.kogito.quarkus.workflows.CallbackStateIT.callbackStateWithError -- Time elapsed: 0.039 s <<< FAILURE!
java.lang.AssertionError: 
1 expectation failed.
Expected status code <201> but was <404>.

In working scenarios, The callback json file is copied into the Integration test module from the Workflow builder module. When project.root.diris wrong, the file is not found while copying, hence is not there when the test is run, causing the not found failure.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response