IntelliJ - 什么表明模块正在 POM 中指示的 Java 版本中编译
IntelliJ - What indicates that a module is compiling in the Java version indicated in the POM
使用在 IntelliJ IDEA 中配置的 multi-module Maven 项目,我在 parent POM 版本的 maven-compiler-plugin 中配置版本 1.8。但是我在某个child模块配置1.5.
在parent中:
<build>
<pluginManagement>
<plugins>
<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>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
在child中:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
在 Eclipse 中,我有这个指标:
如何 and/or 在 IntelliJ IDEA 中我们在哪里检查?我如何知道 child 模块正在使用所需的 1.5 Java 版本进行编译?
相关截图见related answer。
您可以在“项目结构”对话框、“模块”、“源”选项卡:语言级别中找到源版本。
目标版本在文件中 |设置 |构建、执行、部署 |编译器 | Java 编译器(每个模块字节码版本)。
使用在 IntelliJ IDEA 中配置的 multi-module Maven 项目,我在 parent POM 版本的 maven-compiler-plugin 中配置版本 1.8。但是我在某个child模块配置1.5.
在parent中:
<build>
<pluginManagement>
<plugins>
<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>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
在child中:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
在 Eclipse 中,我有这个指标:
如何 and/or 在 IntelliJ IDEA 中我们在哪里检查?我如何知道 child 模块正在使用所需的 1.5 Java 版本进行编译?
相关截图见related answer。
您可以在“项目结构”对话框、“模块”、“源”选项卡:语言级别中找到源版本。
目标版本在文件中 |设置 |构建、执行、部署 |编译器 | Java 编译器(每个模块字节码版本)。