Fatal error compiling: invalid target release: 1.8 [How to Solve]

MVN install reports an error in the title, which is checked in two steps:

    1. idea file – setting
    1. Maven – runner
    1. check whether the JDK version is 1.8

2. Confirm POM file configuration

<plugin>                                                                                                                                      
    <!-- Specify the maven compile jdk version, if not specified, maven3 default with jdk 1.5 maven2 default with jdk1.3 -->                                                                           
    <groupId>org.apache.maven.plugins</groupId>                                                                                               
    <artifactId>maven-compiler-plugin</artifactId>                                                                                            
    <version>3.1</version>                                                                                                                    
    <configuration>                                                                                                                           
        <!-- In general, target and source are kept consistent, however, sometimes there are cases where target differs from source in order to allow the program to run in other versions of jdk (for low version target jdk, syntax not supported in low version jdk cannot be used in the source code) -->                    
        <source>1.8</source> <! -- the JDK version used by the source code -->                                                                                             
        <target>1.8</target> <! -- The compiled version of the target class file to be generated -->                                                                                     
        <encoding>UTF-8</encoding><! -- Character set encoding -->
        <skipTests>true</skipTests><! -- skip tests-->                                                                             
        <verbose>true</verbose>
        <showWarnings>true</showWarnings>                                                                                                                        
    </configuration>                                                                                                                          
</plugin>   

Read More: