Contents

Define JRE version in maven project

Define JRE version in maven project definition

When you create new maven project in Eclipse, project is created with java JRE 1.5.  If you wish to change that to something else, you need to add compiler plugin with desired JRE source and target version.

In maven project configuration file (pom.xml) add this “maven-compiler-plugin” with setting for source and target version:

More detailed informations

Refresh Eclipse project

After changing maven project configuration file (pom.xml) you need to refresh eclipse project.

At project level, with right click open Maven submenu and select Update project…

/images/2016-08-25-21_14_37-Jump-List-for-Mozilla-Firefox-1-278x300.png

Other sources :

Maven for building Java applications - Tutorial