报错前:
<!--maven插件--> <!-- <!–jdk编译插件–> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <encoding>utf-8</encoding> </configuration> </plugin>-->
解决完:(全部不替换掉)
//不配置jdk路径,idea会寻找JAVA_HOME下的jdk路径
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> <fork>true</fork> <executable>D:\ideajdk1.8\jdk\jdk1.8.0_131\bin\javac</executable>//查找适配项目的jdk <encoding>UTF-8</encoding> <compilerArguments> <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs> </compilerArguments> </configuration> </plugin>