Skip to content

#1525: Document known issue and workaround for lombok plugin in Eclipse - #2300

Open
Paras14 wants to merge 2 commits into
devonfw:mainfrom
Paras14:feature/1525-document-lombok-eclipse-issue
Open

#1525: Document known issue and workaround for lombok plugin in Eclipse#2300
Paras14 wants to merge 2 commits into
devonfw:mainfrom
Paras14:feature/1525-document-lombok-eclipse-issue

Conversation

@Paras14

@Paras14 Paras14 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #1525

Implemented changes:

  • Added a Problem, Workaround and Status section to the eclipse chapter of lombok.adoc
    describing that the lombok plugin for eclipse installs successfully but never activates.
  • Documented the root cause (lombok has to be loaded as Java agent via -javaagent, which an
    eclipse plugin installed into a running eclipse cannot do) and linked the upstream issue
    [BUG] Eclipse plugin not working but manually adding javaagent to eclipse.ini works projectlombok/lombok#3621.
  • Documented the manual workaround via eclipse.ini including the side effects
    (shared across all IDEasy projects using the same eclipse version, lost on eclipse update).
  • Documented in the Status section why we deliberately do not automate this in IDEasy,
    so the discussion does not have to be repeated in the future.
  • Added the issue to CHANGELOG.adoc.

This is a documentation-only change, no code was touched.


Testing instructions

Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:

  1. Review the rendered documentation of documentation/lombok.adoc (section Lombok in Eclipse).

  2. To verify the documented workaround, create a small maven project in $IDE_HOME/workspaces/main with this pom.xml:

   <project xmlns="http://maven.apache.org/POM/4.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.example</groupId>
     <artifactId>lombok-test</artifactId>
     <version>1.0-SNAPSHOT</version>
     <properties>
       <maven.compiler.release>21</maven.compiler.release>
       <lombok.version>1.18.42</lombok.version>
     </properties>
     <dependencies>
       <dependency>
         <groupId>org.projectlombok</groupId>
         <artifactId>lombok</artifactId>
         <version>${lombok.version}</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>2.0.16</version>
       </dependency>
     </dependencies>
     <build>
       <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>3.15.0</version>
           <configuration>
             <proc>full</proc>
             <annotationProcessorPaths>
               <path>
                 <groupId>org.projectlombok</groupId>
                 <artifactId>lombok</artifactId>
                 <version>${lombok.version}</version>
               </path>
             </annotationProcessorPaths>
           </configuration>
         </plugin>
       </plugins>
     </build>
   </project>

Add a class com.example.LombokTest annotated with @Slf4j that calls log.info("test") in main. E.g.:

package com.example;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class LombokTest {

public static void main(String[] args) {
 log.info("Lombok works!");
}
}

Note: lombok 1.18.40 or newer is required because IDEasy ships JDK 25, and annotation
processing has to be enabled explicitly via <proc>full</proc> since javac no longer runs
annotation processors by default as of JDK 23.

  1. Run ide mvn clean compile, the build should succeed.

  2. Import the project into eclipse via ide eclipse - eclipse reports log cannot be resolved
    even though the lombok plugin is listed under About Eclipse IDE > Installation Details.
    This is the reported problem.

  3. Follow the documented workaround and add
    -javaagent:«absolute-path-to-lombok.jar» as last line of
    $IDE_HOME/software/eclipse/eclipse.ini.

  4. Restart eclipse via ide eclipse, then run Maven > Update Project... on the project(Right click on the project directory> Maven>Update Project>check the directory>OK. The compile error should be gone.

@Paras14 Paras14 self-assigned this Aug 10, 2026
@Paras14 Paras14 added documentation Improvements or additions to documentation eclipse related to Eclipse IDE plugins related to plugins (for Eclipse, Intellij, VSCode, etc.) labels Aug 10, 2026
@Paras14 Paras14 moved this from 🆕 New to Team Review in IDEasy board Aug 10, 2026
@JoelAdbu JoelAdbu self-assigned this Aug 10, 2026

@JoelAdbu JoelAdbu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The description is clear and explains the current Lombok issue well.

@JoelAdbu JoelAdbu moved this from Team Review to 👀 In review in IDEasy board Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation eclipse related to Eclipse IDE plugins related to plugins (for Eclipse, Intellij, VSCode, etc.)

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

lombok not correctly installed in eclipse

2 participants