Build FAILURE of OpenMRS core in openmrs-api

On executing the following commands the build fails cd openmrs-core mvn clean package

Tests run: 4332, Failures: 9, Errors: 3569, Skipped: 34

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for OpenMRS 2.4.0-SNAPSHOT:
[INFO] 
[INFO] OpenMRS ............................................ SUCCESS [  0.695 s]
[INFO] openmrs-tools ...................................... SUCCESS [  0.768 s]
[INFO] openmrs-test ....................................... SUCCESS [  0.073 s]
[INFO] openmrs-api ........................................ FAILURE [ 29.567 s]
[INFO] openmrs-web ........................................ SKIPPED
[INFO] openmrs-webapp ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  31.325 s
[INFO] Finished at: 2020-02-12T21:53:11+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project openmrs-api: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/sid/openmrs-core/api/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :openmrs-api

Can you paste the entire build log at pastebin.com?

@dkayiwa I was facing this issue yesterday but its working now

1 Like

@sidvaish97 congs :+1:

can you share with the community how you solved the above blocker so that when another person facing the similar blocker can easily refer to this

@gcliff Yes sure. So I have noticed that mostly the test fail when we try to run mvn clean install this maybe because of a bad PR merge or incomplete tests, so I used mvn clean install -DskipTests to build the package till the fix is done.

Would be interested in know the tests which failed. Do you mind sharing the failure log?

@dkayiwa openmrs-web test failed and openmrs-webapp was skipped. Its now working fine, so I don’t have the failure logs