Skip to content

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

Open
Paras14 wants to merge 8 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 8 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
@coveralls

coveralls commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 32346559810

Coverage increased (+0.004%) to 72.94%

Details

  • Coverage increased (+0.004%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 1 coverage regression across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/version/VersionSegment.java 1 90.81%

Coverage Stats

Coverage Status
Relevant Lines: 17567
Covered Lines: 13363
Line Coverage: 76.07%
Relevant Branches: 7769
Covered Branches: 5117
Branch Coverage: 65.86%
Branches in Coverage %: Yes
Coverage Strength: 3.23 hits per line

💛 - Coveralls

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Paras14 thanks for your PR. You nicely elaborated the situation and described all well in this documentation. Great job 👍
I added some minor review comments for discussion, but we can also merge as is.

Comment thread documentation/lombok.adoc
Comment on lines +29 to +30
A Java agent can only be activated with the JVM option `-javaagent` when eclipse is started.
An eclipse plugin however is installed into an already running eclipse and therefore can never do this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMHO your rationale is not really correct. This used to work with the lombok eclipse plugin earlier but broke with Eclipse updates. But however, great that you linked the issue so everybody can be pointed there and read more details or even find it fixed some fine day in the future...

Comment thread documentation/lombok.adoc
Comment on lines +39 to +46
Otherwise you can download it from https://projectlombok.org/download[projectlombok.org].
Please use the same version that your project is compiling against to avoid differences between your IDE and your build.
2. Open the file `$IDE_HOME/software/eclipse/eclipse.ini` in a text editor.
3. Add the following line at the very end of that file or atleast make sure it is placed after the `-vmargs` line since everything before is passed to the eclipse launcher instead of the JVM:
+
```
-javaagent:«absolute-path-to-lombok.jar»
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can even run the lombok JAR file and see a GUI where you can browse to your Eclipse installation and it will automatically fix the ini file for you.
Maybe that process would be easier for end-users. If you are luck, you can just double-click the JAR to launch lombok installer GUI.

@hohwille hohwille added this to the release:2026.08.002 milestone Aug 21, 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

5 participants