Why is the Team module build failing?

I am trying to build openmrs-module-team. As a part of Connect OpenMRS with Telegram Messenger to push notifications based on Team/Team Member gsoc project we have to use this module. I have clone it from here . After cloning and doing mvn clean install I am getting following error with java6 -

 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project teammodule-api: Compilation failure
    [ERROR] /Users/puevigreven/telegram-gsoc/openmrs-module-team/api/src/main/java/org/openmrs/module/teammodule/api/db/hibernate/HibernateTeamMemberDAO.java:[88,57] illegal start of type

with java7 and java8-

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project teammodule-api: Compilation failure
[ERROR] /Users/puevigreven/telegram-gsoc/openmrs-module-team/api/src/main/java/org/openmrs/module/teammodule/api/db/hibernate/HibernateTeamMemberDAO.java:[88,62] diamond operator is not supported in -source 1.5
[ERROR] (use -source 7 or higher to enable diamond operator)

I have tried to investigate HibernateTeamMemberDAO.java but could not solve the error.

It would be great help if anyone can guide me to solve the issue. :slight_smile:

It looks like this module is developed by the OpenSRP project and not currently maintained within the OpenMRS community, but I have used the invite button to hopefully get the attention of some of the people mentioned in the notes from this developers forum. :slight_smile:

1 Like

It builds successfully for me with jdk-1.7.0_04, default settings of module, maven version 3.2.1, and windows 10.

I seems that you are still building project in java compiler 1.5. Rightclick on api , configure build path, select jdk 1.7 Repeat same steps for omod.

It should work now image attached shows how setting page wold look like.

@maimoonak thank you for the reply. It solved the issue. :slight_smile: For the people who do not use IDE for development, you can change configuration of maven-compiler-plugin to 1.7 in pom.xml in api folder. The file will look like:

<configuration>
    	<target>1.7</target>
    	<source>1.7</source>
</configuration>