常州市网站建设_网站建设公司_JSON_seo优化
2026/1/16 12:13:11 网站建设 项目流程

The key change that solved it was moving the git-commit-id-plugin execution to the process-resources.

Here's what happened:

The Problem:
Initially, the git-commit-id-plugin was running in the default phase (very early in Maven lifecycle), This was interfering with Lombok's annotation processing during compilation, Lombok needs to process annotations before the main compilation, but the git plugin was conflicting with this

The Solution:
By adding process-resources, we moved the git plugin execution to after the compilation phase, This allows Lombok to do its work first without interference, The git plugin still generates the git.properties file, but at a time that doesn't conflict with Lombok

Timeline:

  1. Lombok processes annotations and generates code
  2. Java compilation happens successfully
  3. Resources are processed
  4. Git plugin runs here (process-resources phase) and generates git.properties
  5. Application can start and read the git information

So running the git plugin at the right phase in the Maven lifecycle to avoid the Lombok conflict while still generating the Git information you needed for the actuator endpoint.

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询