How to Fix JDK Version Too Low Error When Building Maven Projects in Jenkins
The reason is that Maven defaults to versions 1.4 or 1.5. Navigate to the Maven installation directory and modify the version configuration file to fix this.
Here is an example using my installation path:
cd /usr/local/apache-maven/conf
vi settings.xml Scroll down to near the bottom where the JDK setting is and add the following code …