Error in the Maven Install

This error occurred when I was running ‘mvn clean build’ and getting the error below:

[ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.

forces the version in build

org.apache.maven.plugins maven-compiler-plugin 3.8.0 10</source> 10

Better solution is to go into Eclipse and check the build path