Maven Build failure on master branch

Hello members, I am working on this ticket but after importing the project on eclipse, I ran “mvn clean install” on my branch just to ensure maven build is fine but instead I got the error log I checked out of my branch to the master branch but still I got the same the error log after running “mvn clean install command”. I have ensured the local master branch is equal to the master with ref: ‘upstream/master’ by running the following commands:"git remote add upstream’’, git pull upstream master, git reset --hard upstream/master then mvn clean install but still the maven build is failing. Though am tempted to think the failure is related to maven versions… I would like to seek help from the community on how I can go about the maven build failure so that I can go ahead and make the required changes.

cc @ruhanga, @dkayiwa, @mozzy, @samuel34

Looks like you need a property when running the maven clean install command, this is documented in the pom file of the related project here,

You may have to add the option -Dopenmrs.version=2.4.0-SNAPSHOT or use any other valid openmrs platform version for the option on the command.

After adding the above I get the following error log

Could you also try with other existing openmrs versions probably prior to 2.4.0-SNAPSHOT?

Let me do it.

I have tried all the lower in 2.x but I still get the same error log as before

@ruhanga this is the error log after running -Dopenmrs.version=2.4.0-SNAPSHOT using different versions. The mvn clean install -Dopenmrs.version=2.2.0 appeared successful but at the end the build failed. Still open to any suggestion.

The failures mean a couple of issues from low bandwidth, to using non-existing versions, to running out of memory on your work-tool (PC). See below piece of the error on the build that almost seemed successful;

[ERROR] Java heap space -> [Help 1]
[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.

You may want to optimize your RAM to have enough space by closing the applications you may not be using at the moment, then run the build again with the version that seemed to proceed successfully. Also make sure you have enough bandwidth to proceed.

thanks @ruhanga for the help.i hope @jwnasambu all is doing well now

Though still failing, but I promise to harden. No surrender my mentor.

1 Like

Sure , we have to keep on keeping on :slightly_smiling_face: ,
what step is it failing on now , and the error log now ??

@ruhanga and @mozzy I have tried my level best to run the build with limited applications running, stayed within the openmrs version ranger but still I get this error log when I run mvn clean install -X switch, this is the out put and the bandwidth has been good enough. Still open to any suggestion.

@jwnasambu, looks like there are missing artifacts for some of the platform distros you may have used. You could try with these versions 2.1.2, 2.1.3, 2.1.4, 2.2.0-beta, 2.2.0, 2.3.0-beta .

Kindly this paste bin link contains the output of all the suggested versions after running -Dopenmrs.version= the SNAPSHOT and later
-X switch to enable full debug logging.