In my maven project, I have this Effective POM:
After following above troubleshooting steps. Update your maven project.
Right click on your project--> Maven--> Update Project
Or simply Alt+f5.
Hope this might help someone.
Build Path and change the Java Library version to 1.71.7 Dynamic Web Module and click Apply (also uncheck JavaServer Faces if you had that)Java facet version to 1.7 and click ApplyDyanmic Web Module v3.0, apply. Eclipse's facets configuration is buggy. Make sure you keep hitting Apply between checking and unchecking of facets.
Links:
This works for me:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<warName>mfp</warName>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<finalName>myprojectname</finalName>
</build>
I had to reset maven settings in Window->Preferences->Maven-> User Settings to "C:\Development\apache-maven-3.5.3\conf\settings.xml".
Changed version to 3.1 and the tags and to 1.7
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
I am using java 1.8. Fixed doing the following.
Remove from pom:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
It will complain that pom is not up to date. Used quick fix to update then you get a whole bunch of errors.
RE-ADD to pom:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
Updated maven and all errors are cleared.