bahmni-core build errors

Hi,

I have followed https://bahmni.atlassian.net/wiki/display/BAH/Setting+up+Bahmni+Dev+Environment to setup my CentOS system as the build environment, however having issues in building bahmni-core

Initially I got [INFO] Compiling 9 source files to /home/spoojary/projects/bahmni/bahmni-core/bahmni-mapping/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Failure executing javac, but could not parse the error: javac: invalid target release: 1.8 Usage: javac use -help for a list of possible options

[INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] BahmniEMR Core … SUCCESS [33.251s] [INFO] Bahmni Mapping … FAILURE [7:29.213s]

though I have installed Sun JDK7 and path was set accordingly. Thinking that could be an issue with java/maven versions, I updated pom.xml to org.apache.maven.plugins maven-compiler-plugin 1.7 1.7 without really understanding it. With that change, I got a different error Running org.openmrs.module.bahmnimapping.services.impl.BahmniLocationServiceImplTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.466 sec <<< FAILURE!

Results :

Tests in error: getEncounterTypeShouldRaiseErrorWhenLocationIsMappedToMultipleEncounterTypes(org.openmrs.module.bahmnimapping.services.impl.BahmniLocationServiceImplTest): org/openmrs/api/APIException : Unsupported major.minor version 52.0

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] BahmniEMR Core … SUCCESS [0.449s] [INFO] Bahmni Mapping … FAILURE [45.827s]

I am not sure whether I am doing anything wrong or the documentation is not updated. Any help is really appreciated…

Hi Sathisha,

From Bahmni 0.88(in which we upgraded to OpenMRS 2.x), Java8 is used. So please install Oracle Java 8 and retry. And change the maven-compiler-plugin back to 1.8 Sorry for inconvenience. We will update the wiki. @binduak