I\'m new to maven, and also to MacOS.
I have setup maven in my terminal, and when getting the version settings (using mvn -v) it seems it uses JDK 1.6,
Please check the compatibility. I struggled with mvn 3.2.1 and jdk 1.6.0_37 for many hours. All variables were set but was not working. Finally I upgraded jdk to 1.8.0_60 and mvn 3.3.3 and that worked. Environment Variables as following:
JAVA_HOME=C:\ProgramFiles\Java\jdk1.8.0_60
MVN_HOME=C:\ProgramFiles\apache-maven\apache-maven-3.3.3
M2=%MVN_HOME%\bin extend system level Path- ;%M2%;%JAVA_HOME%\bin;