From 320c61c69a2d5446f1f8f1f1564926b028171480 Mon Sep 17 00:00:00 2001 From: Diego Gerardo Barajas Suarez Date: Tue, 11 Aug 2026 17:46:36 -0500 Subject: [PATCH] fix: replace lombok-maven-plugin with exec-maven-plugin for delombok lombok-maven-plugin:1.18.20.0 is incompatible with lombok:1.18.46, producing an empty target/delombok. maven-javadoc-plugin 3.12.0 then reports "No Javadoc in project" regardless of sourcepath config, causing Maven Central to reject the deployment. This commit: - Replaces lombok-maven-plugin with exec-maven-plugin that invokes `java -jar lombok-1.18.46.jar delombok` directly, ensuring version compatibility and support for Java 11/17/21 - Extracts lombok.version as a property to keep version in sync - Restores sourcepath pointing to target/delombok (now reliably populated) - Removes -Dlombok.delombok.skip=true from CI and CD workflows since the flag only applied to the now-removed lombok-maven-plugin Co-Authored-By: Claude Sonnet 4.6 (1M context) --- .github/workflows/cd-release.yml | 2 +- .github/workflows/ci.yml | 5 +++-- pom.xml | 29 +++++++++++++++++++---------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index b29047b2..aeb93a01 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -34,4 +34,4 @@ jobs: MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} run: | - mvn --no-transfer-progress --batch-mode clean deploy -Dlombok.delombok.skip=true + mvn --no-transfer-progress --batch-mode clean deploy diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30f6baf4..87f3f38d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,10 +27,11 @@ jobs: distribution: "temurin" - name: Compile - run: mvn compile --no-transfer-progress -Dlombok.delombok.skip=true + run: mvn compile --no-transfer-progress - name: Run unit tests - run: mvn test --no-transfer-progress -Dtest="**/*Test" -DfailIfNoTests=false -Dlombok.delombok.skip=true + run: mvn test --no-transfer-progress -Dtest="**/*Test" -DfailIfNoTests=false + - name: Dependency review if: github.event_name == 'pull_request' diff --git a/pom.xml b/pom.xml index 2307d536..dba8fe58 100644 --- a/pom.xml +++ b/pom.xml @@ -106,6 +106,7 @@ 1.8 none + ${project.build.directory}/delombok ${project.basedir}/docs @@ -163,20 +164,27 @@ - org.projectlombok - lombok-maven-plugin - 1.18.20.0 - - ${project.basedir}/src/main/java - ${project.build.directory}/delombok - false - + org.codehaus.mojo + exec-maven-plugin + 3.4.1 + delombok generate-sources - delombok + exec + + java + + -jar + ${settings.localRepository}/org/projectlombok/lombok/${lombok.version}/lombok-${lombok.version}.jar + delombok + ${project.basedir}/src/main/java + -d + ${project.build.directory}/delombok + + @@ -193,6 +201,7 @@ UTF-8 + 1.18.46 @@ -260,7 +269,7 @@ org.projectlombok lombok - 1.18.46 + ${lombok.version} provided