I am developing a java project and every thing working fine, then once I needed to change the version of a library I use. When I run mvn install a compilation error appeared:
[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /C:/Users/marwa/eclipse-workspace-photon/OntologyReuseProject/src/main/java/OntologyMatchingPackage/AMLMappings.java:[94,61] diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator) [ERROR] /C:/Users/marwa/eclipse-workspace-photon/OntologyReuseProject/src/main/java/OntologyMatchingPackage/OntologyMatchingAlgorithm.java:[42,60] diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator) [INFO] 2 errors
I am using Java 1.7 and also after this error I try to use 1.8 but the error still appear although the project is running correctly . How to solve this compilation error?