Failing to Build OpenMRS 2.4.0-SNAPSHOT due to a maven Error

Tags: #<Tag:0x00007f0f1cb57340>

Hello I am trying to build the OpenMRS core repo but I am getting this error:
Is there a way I can fix it.

@mozzy @sharif
maven version: Maven home: apache-maven-3.6.3 Error Log here : https://pastebin.com/NemFgWmu

The logs you have shared is not full, can you share the full log including the command you have used to build the core

1 Like

Okay @sharif the full log is here: https://pastebin.com/iKsFLqrn The command was mvn clean package

Can you first do a mvn clean install and share the logs and we see, Even this $ mvn clean package, seems to be missing the project directory enhancement. It would be much more better your directory project placement look something similar to this C:\Users\Insookwa\Projects\openmrs-core then mvn clean install. sometimes maven will misbehave if you are not pointing to this

Thanks @sharif . i al getting the same error

The logs are here : https://pastebin.com/X75NdNjn

Can you also try changing the project directory and point to C like the eg above and try again and we see thanks

I am actually running in this directory C:\Users\Insookwa\openmrs-core> just that I used the Git bash. when I run from CMD , its the same error : https://pastebin.com/ygHJPEGf

Which java version are you using?. Again try using command line not git bash, in this case try mvn clean install -U, and share the logs and we see the output

C:\Users\Insookwa\openmrs-core>java -version

java version “1.8.0_241” Java™ SE Runtime Environment (build 1.8.0_241-b07) Java HotSpot™ 64-Bit Server VM (build 25.241-b07, mixed mode)

C:\Users\Insookwa\openmrs-core>

Thats good , try this and share the logs again please

When i try mvn clean install -U. it fails at the same point Logs are here: https://pastebin.com/WK8PA5BV

1 Like

Which version of maven are you using as we look through the logs. mvn -v ?

1 Like
C:\Users\Insookwa>mvn -v

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\Users\Insookwa\apache-maven-3.6.3\bin… Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_241\jre Default locale: en_US, platform encoding: Cp1252 OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”

1 Like

When did you last update this project, is it updated to master ?

I’ve cloned it like 3 hours ago

@insookwa , sorry about the error.

Seems a problem with corrupted dependency.

  • The painful approach would be to clean/empty your .m2/repository folder and run "mvn clean install -U" again

and share the logs

1 Like

@mozzy I am running into the same error . The Logs are here https://pastebin.com/8Rzs11jM

2 Likes

what does your JAVA_HOME enviroment variable point to ?? can you check your environment variables ??

1 Like

if you dont have it , you can create it and point it to your JDK ,and retry the build

1 Like

His output of mvn -v confirms the Java version that maven is using. @insookwa did you really delete the folder as @mozzy advised? If yes, what is the path to the folder that you deleted?

1 Like