Skip to content

Commit 5e21498

Browse files
committed
feat(build): 升级JDK版本至25并优化编译配置
- 将java.version从17升级至25以支持新特性 - 新增jdk25-annotation-processor profile自动激活配置 - 为JDK25+环境单独配置lombok annotationProcessorPaths - 保持原有UTF-8编码和parameters编译参数配置 Signed-off-by: PIGCLOUD <[email protected]>
1 parent 18df157 commit 5e21498

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

pom.xml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<properties>
2828
<!-- 项目版本号 -->
2929
<revision>3.9.2</revision>
30-
<java.version>17</java.version>
30+
<java.version>25</java.version>
3131
<spring-boot.version>3.5.7</spring-boot.version>
3232
<spring-cloud.version>2025.0.0</spring-cloud.version>
3333
<spring-cloud-alibaba.version>2025.0.0.0</spring-cloud-alibaba.version>
@@ -261,13 +261,6 @@
261261
<release>${java.version}</release>
262262
<encoding>UTF-8</encoding>
263263
<parameters>true</parameters>
264-
<!-- 支持 JDK 25 编译 -->
265-
<annotationProcessorPaths>
266-
<path>
267-
<groupId>org.projectlombok</groupId>
268-
<artifactId>lombok</artifactId>
269-
</path>
270-
</annotationProcessorPaths>
271264
</configuration>
272265
</plugin>
273266
<!--打包jar 与git commit 关联插件-->
@@ -330,5 +323,29 @@
330323
<module>pig-boot</module>
331324
</modules>
332325
</profile>
326+
<!-- 自动激活,针对 lombok 注解增强-->
327+
<profile>
328+
<id>jdk25-annotation-processor</id>
329+
<activation>
330+
<jdk>[25,)</jdk>
331+
</activation>
332+
<build>
333+
<plugins>
334+
<plugin>
335+
<groupId>org.apache.maven.plugins</groupId>
336+
<artifactId>maven-compiler-plugin</artifactId>
337+
<configuration>
338+
<!-- 支持 JDK 25+ 编译 -->
339+
<annotationProcessorPaths>
340+
<path>
341+
<groupId>org.projectlombok</groupId>
342+
<artifactId>lombok</artifactId>
343+
</path>
344+
</annotationProcessorPaths>
345+
</configuration>
346+
</plugin>
347+
</plugins>
348+
</build>
349+
</profile>
333350
</profiles>
334351
</project>

0 commit comments

Comments
 (0)