BUILD FAILURE: openmrs-api test is failing

I am getting this error when I try to mvn clean package. I cloned the repository and tried again but the exact error popped up again. Would love for some inputs for resolving this issue.

Hello,

I encountered a similar issue while using Maven 3.9.9 with JAVA_HOME initially set to Java 8. I managed to resolve it by updating the Maven configuration to use Java 17.

Here’s what worked for me:

I added the following line at the beginning of the mvn.cmd file:

set JAVA_HOME=C:\apps\17.0.13-win32-x86_64

This adjustment successfully resolved the issue. I hope this helps anyone facing the same problem!

Best regards,

1 Like

Thank you!

Actually I am trying to follow the readme instructions and am using mvn clean package, is that the way to go to start contributing? As I’m reading the blog on the website which tells me to set up a server using docker so I got confused. I’m new to this so still learning :smiley: Any help would be appreciated

What does this command return for you? mvn -v

Switch to Java 17 and compile again.

1 Like

Thank you! That worked. I installed the server and I’m looking for documentation regarding reference application, is there a difference between using that and legacy UI in terms of contributing?