IDEA启动项目时编译不通过,报Error:java:无效的标记:……\src\main\webapp\WEB-INF\lib
<!-- Compiler 插件, 设定JDK版本 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>-verbose</arg>
<arg>-Xlint:unchecked</arg>
<arg>-Xlint:deprecation</arg>
<arg>-bootclasspath</arg>
<bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
<arg>-extdirs</arg>
<arg>${project.basedir}/src/main/webapp/WEB-INF/lib</arg>
</compilerArgs>
</configuration>
</plugin>
将存在于pom.xml中的第16行<arg>${project.basedir}/src/main/webapp/WEB-INF/lib</arg>注释掉重新编译一遍即可,编译通过后这一行可以解开,注意打包时是必定要解开注释的。