Maven Build failure on master branch

Hello members, I am working on this ticket https://issues.openmrs.org/browse/STAND-100 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 https://pastebin.com/usWPMa8X. 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 https://github.com/openmrs/openmrs-standalone.git’’, 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 https://pastebin.com/gAKBHgvM

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 https://pastebin.com/PgFAE9VM

@ruhanga this is the error log https://pastebin.com/5sLdHS2H 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]
[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]

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 https://pastebin.com/Y6phFYCJ when I run mvn clean install -X switch, this is the out put https://pastebin.com/N3XS6PTj. 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 https://pastebin.com/9MxfuVsN contains the output of all the suggested versions after running -Dopenmrs.version= the SNAPSHOT and later
-X switch to enable full debug logging.