Build error on running OpenMRS core

Question: Hello guys:

I’m facing issue to build openmrs-core from the GitHub repository. It looks like the issue is with some test failures The following are the Java and Maven versions:

The following are the errors shown when running the command from the GitHub repo steps: mvn clean package

[INFO]
[ERROR] Tests run: 4349, Failures: 2, Errors: 15, Skipped: 38
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for OpenMRS 2.5.0-SNAPSHOT:
[INFO]
[INFO] OpenMRS ............................................ SUCCESS [  1.220 s]
[INFO] openmrs-tools ...................................... SUCCESS [  0.759 s]
[INFO] openmrs-test ....................................... SUCCESS [  0.234 s]
[INFO] openmrs-api ........................................ FAILURE [05:59 min]
[INFO] openmrs-web ........................................ SKIPPED
[INFO] openmrs-webapp ..................................... SKIPPED
[INFO] openmrs-liquibase .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:01 min
[INFO] Finished at: 2021-02-01T12:58:58+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project openmrs-api: There are test failures.

Please find the error log here https://pastebin.com/2YNCcBUU

Remove the space from the OpenMRS Codebase folder name and compile again.

It worked. Thanks Daniel. On a side note. I’m I missing something in the initial setup? The website is showing JQuery not found error and not showing any progress but the tables are created in MySQL.

Also it is throwing an exception.

I’m new to the community. Let me know the process, I can create a different topic for the issue.

The versions of modules in the C:\Users\v-shsh39\Application Data\OpenMRS\modules folder are not compatible with the OpenMRS platform version. You can replace them with these: Download OpenMRS from SourceForge.net

Still facing issue after copying the modules and owa folders. Please find the error log: https://pastebin.com/PkrXKH65

@dkayiwa I tried to build the Open MRS branch ‘2.4.x’ and it worked successfully. No issues related to:

  • Front-end issue (JQuery) issue was not faced on that branch
  • Modules loaded successfully

Is the master branch not stable?

The error you got was fixed in the emrapi module here: Update config.xml to support versions of 2.x after 2.4.x · openmrs/openmrs-module-emrapi@5b319dc · GitHub

So if you use this set of modules, you should be good on the master branch: https://ci.openmrs.org/build/result/artifactUrlRedirect.action?planKey=REFAPP-OMODDISTRO&buildNumber=10856&artifactName=referenceapplication-addons-snapshot