不支持发行版本5

问题:使用Intellij IDEA 新建Java项目,使用jdk11版本,设置好Target bytecode version 为11,Language level为11。但是,每次新加一个module,所有的设置都变成默认的11。


解决方法:在工程的pom.xml中添加 

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
                <source>11</source>
                <target>11</target>
            </configuration>
        </plugin>
    </plugins>
</build>
原文地址:https://www.cnblogs.com/YXBLOGXYY/p/15045609.html