I have a maven project forked and cloned from a git repo onto my eclipse. It is build on Java 8. The first thing i do is perform a
mvn clean install
In case if you are able to compile mvn compile the project successful from terminal but not from Eclipse check out Window > Preferences >Installed JREs, make sure you have selected JRE that is under JDK (check out the paths of 2 different JRE's in pic), as Maven needs JDK to compile you need to add it.