mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
fix(pom.xml): -source X 中不支持 XX
问题描述:使用 maven 编译项目时,部分环境会编译失败,出现 -source X 中不支持 XX [ERROR] (请使用 -source Y 或更高版本以启用 XX) 解决方案:需要手动指定 Java 编译器的 -source 和 -target 参数
This commit is contained in:
parent
3c93f90fad
commit
46d03883ed
9
pom.xml
9
pom.xml
@ -221,6 +221,15 @@
|
|||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<!--指定 Java 编译器的 -source 参数 -->
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<!--指定 Java 编译器的 -target 参数 -->
|
||||||
|
<target>${java.version}</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<repositories>
|
<repositories>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user