maven项目编译报“Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1”
解决方案:setting.xml的节点<profiles>添加以下配置
<profile> <id>jdk18</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile>