This is an automated email from the ASF dual-hosted git repository.

vinishjail97 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-xtable.git


The following commit(s) were added to refs/heads/main by this push:
     new 930b881d [MINOR] Run delombok only in the release profile (#884)
930b881d is described below

commit 930b881d2274eebd26f60b73d02e592eaf24af42
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Fri Aug 7 23:33:33 2026 +0200

    [MINOR] Run delombok only in the release profile (#884)
    
    The delombok output has exactly one consumer: maven-javadoc-plugin in
    the release profile, which reads ${delombok.output.dir} so that the
    lombok-generated builders, getters and equals/hashCode appear in the
    javadoc jar. There is no <reporting> section and the website build is
    Docusaurus, so nothing else looks at it.
    
    The execution itself sat in <build><plugins> bound to generate-sources,
    so it ran on every build - every CI run and every local install - to
    produce a directory that only a release ever reads. Move it next to its
    consumer.
    
    This keeps the javadoc jars intact, so it is not a repeat of #728, which
    removed the plugin outright and left the javadoc jar empty until #854
    restored it. Verified below.
    
    It also takes lombok-maven-plugin off the path of ordinary builds. Its
    last release is 1.18.20.0 (April 2021) and it cannot delombok on JDK 21+,
    so today every contributor pays for a plugin whose output they never use.
    Note this removes one of three independent JDK 21 blockers - spotless
    (google-java-format 1.10.0 < 1.17.0) and a javac-21 inference failure in
    xtable-core remain, so this alone does not make the build JDK 21 ready.
    
    Verified on Temurin 11 with the project's wrapper:
    
    - ./mvnw install -DskipTests            -> 0 delombok executions, BUILD 
SUCCESS
    - ./mvnw package -DdeployArtifacts=true -> 10 delombok executions, 6 javadoc
                                               jars, and InternalTable.html 
documents
                                               builder(), the generated
                                               InternalTableBuilder class, the 
getters
                                               and equals/hashCode
---
 pom.xml | 46 +++++++++++++++++++++++++++-------------------
 1 file changed, 27 insertions(+), 19 deletions(-)

diff --git a/pom.xml b/pom.xml
index 630a9fef..edcb5dce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -719,25 +719,6 @@
                 </annotationProcessorPaths>
             </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.projectlombok</groupId>
-                <artifactId>lombok-maven-plugin</artifactId>
-                <version>${lombok-maven-plugin.version}</version>
-                <configuration>
-                    
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
-                    <addOutputDirectory>false</addOutputDirectory>
-                    <outputDirectory>${delombok.output.dir}</outputDirectory>
-                    <encoding>UTF-8</encoding>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>delombok</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>
@@ -1078,6 +1059,33 @@
             </activation>
             <build>
                 <plugins>
+                    <!--
+                      Delombok only runs here: its sole consumer is the 
javadoc plugin below,
+                      which reads ${delombok.output.dir} so that the generated 
builders, getters
+                      and equals/hashCode show up in the javadoc jar. Running 
it on ordinary
+                      builds costs time and forces every contributor through
+                      lombok-maven-plugin, whose last release is 1.18.20.0 
(April 2021) and
+                      which cannot delombok on newer JDKs.
+                    -->
+                    <plugin>
+                        <groupId>org.projectlombok</groupId>
+                        <artifactId>lombok-maven-plugin</artifactId>
+                        <version>${lombok-maven-plugin.version}</version>
+                        <configuration>
+                            
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
+                            <addOutputDirectory>false</addOutputDirectory>
+                            
<outputDirectory>${delombok.output.dir}</outputDirectory>
+                            <encoding>UTF-8</encoding>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>generate-sources</phase>
+                                <goals>
+                                    <goal>delombok</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-source-plugin</artifactId>

Reply via email to