Spring Boot 4.0.0-M3 modulith with latest jmolecules:


    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>4.0.0-M3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <properties>
        <java.version>21</java.version>
        <spring-modulith.version>2.0.0-M3</spring-modulith.version>
        <jmolecules.version>2025.0.0-RC5</jmolecules.version>
    </properties>   

The Maven Commandline build and the Intellij project build fail, error message "Symbol not found" for all methods that should be generated by Lombok. Using Maven 3.9.9 with wrapper or with Intellij embedded Maven. The generated methods are "clickable" and bring me to the field or class annotated with Lombok annotations.

I believe I have followed the Lombok setup page to the letter, I have tried to set the version explicitly or using ${lombok.version}. The initializr creates a project that works fine.

With Spring Boot 3.5.4 and these versions everything is fine:

        <java.version>21</java.version>
        <spring-modulith.version>1.4.0</spring-modulith.version>
        <jmolecules.version>2025.0.0-RC4</jmolecules.version>
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>4.0.0-M3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>de.example.foo</groupId>
    <artifactId>bar</artifactId>
    <version>0.1.1-SNAPSHOT</version>
    <name>baz</name>
    <description>Baz Service</description>
    <properties>
        <java.version>21</java.version>
        <spring-modulith.version>2.0.0-M3</spring-modulith.version>
        <jmolecules.version>2025.0.0-RC5</jmolecules.version>
        <guava.version>33.5.0-jre</guava.version>
        <jacoco.version>0.8.13</jacoco.version>
        <jooq.version>3.20.6</jooq.version>
        <sonar.host.url>http://sonarqube9.dev.dzbw.de:9000</sonar.host.url>
        <sonar.projectName>Baz</sonar.projectName>
        <sonar.projectKey>baz</sonar.projectKey>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.jacoco.reportPath>${project.build.directory}/jacoco.exec</sonar.jacoco.reportPath>
        <sonar.language>java</sonar.language>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.modulith</groupId>
                <artifactId>spring-modulith-bom</artifactId>
                <version>${spring-modulith.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <!-- see https://github.com/xmolecules/jmolecules-bom -->
                <groupId>org.jmolecules</groupId>
                <artifactId>jmolecules-bom</artifactId>
                <version>${jmolecules.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-rest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-rest-hal-explorer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-hateoas</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.modulith</groupId>
            <artifactId>spring-modulith-starter-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.modulith</groupId>
            <artifactId>spring-modulith-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jooq</artifactId>
        </dependency>
        <dependency>
            <groupId>org.zalando</groupId>
            <artifactId>logbook-spring-boot-starter</artifactId>
            <version>3.12.3</version>
            <exclusions>
                <exclusion>
                    <artifactId>apiguardian-api</artifactId>
                    <groupId>org.apiguardian</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jooq</groupId>
            <artifactId>jooq-meta-extensions-liquibase</artifactId>
            <version>${jooq.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.uuid</groupId>
            <artifactId>java-uuid-generator</artifactId>
            <version>5.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.jmolecules.integrations</groupId>
            <artifactId>jmolecules-starter-ddd</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jmolecules.integrations</groupId>
            <artifactId>jmolecules-apt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jmolecules</groupId>
            <artifactId>jmolecules-onion-architecture</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jmolecules.integrations</groupId>
            <artifactId>jmolecules-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jmolecules.integrations</groupId>
            <artifactId>jmolecules-spring</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jmolecules.integrations</groupId>
            <artifactId>jmolecules-jackson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jmolecules</groupId>
            <artifactId>jmolecules-events</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jmolecules.integrations</groupId>
            <artifactId>jmolecules-bytebuddy-nodep</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.validation</groupId>
            <artifactId>jakarta.validation-api</artifactId>
            <version>3.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>9.0.1.Final</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>

        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>error_prone_annotations</artifactId>
                    <groupId>com.google.errorprone</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.modulith</groupId>
            <artifactId>spring-modulith-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-joda-time</artifactId>
            <version>2.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-db</artifactId>
            <version>2.0.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${lombok.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>3.11.0.3922</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.11</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-maven-plugin</artifactId>
                <version>${byte-buddy.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>transform-extended</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <classPathDiscovery>true</classPathDiscovery>
                    <incremental>true</incremental>
                    <source>${project.build.outputDirectory}</source>
                    <target>${project.build.outputDirectory}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.github.git-commit-id</groupId>
                <artifactId>git-commit-id-maven-plugin</artifactId>
                <version>9.0.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>
                        ${project.build.directory}/generated-resources/git.properties
                    </generateGitPropertiesFilename>
                    <includeOnlyProperties>
                        <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
                        <includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
                    </includeOnlyProperties>
                    <commitIdGenerationMode>full</commitIdGenerationMode>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.6.1</version>
                <executions>
                    <execution>
                        <id>add-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>
                                    ${project.build.directory}/generated-sources
                                </source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-resource</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>${project.build.directory}/generated-resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!--suppress UnresolvedMavenProperty -->
                    <argLine>
                        @{argLine}
                        -javaagent:${org.mockito:mockito-core:jar}
                        -Xshare:off
                    </argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.github.q3769</groupId>
                <artifactId>semver-maven-plugin</artifactId>
                <version>20240116.0.202411140438</version>
            </plugin>
        </plugins>
    </build>
</project>

Comment From: wilkinsona

Thanks for the report. Unfortunately, the Spring Boot team do not have time to diagnose problems with Lombok as Boot doesn't nothing more than manage its version. I would guess that you may be seeing a regression in Lombok itself. Boot 3.5.4 uses Lombok 1.18.38 whereas 4.0.0-M3 uses 1.18.40. The changelog does mention an "improbable breaking change" in 1.18.40.

Comment From: rzwitserloot

@wilkinsona how rude of you. You saw 'improbable breaking change' and went: Yup, that's it, and stopped reading.

I wrote that line and now I feel like you're punishing lombok for writing proper documentation. It is not the reason and if you read the rest of the text you'd have known that. This does not seem like a reasonable way to deal with bug reports.

lombok ticket 3968 is the appropriate place to handle this issue, this isn't spring related. This ticket should remain closed.

I'm simply making a note that your comment is insultingly terrible!

It disincentivises projects from being clear about changes. There's a relevant XKCD for you: XKCD: Workflow and even a name: Hyrum's Law. Your disdain for any documentation about breaking changes is thus harmful and unproductive; any change has the potential to break somebody's workflow. That a project decides to document the bizarre path is no reason to blame that project. Quite the opposite.

Comment From: philwebb

@rzwitserloot I don't think @wilkinsona was trying to be rude here or punish Lombok for writing release notes and to be honest your comment seems like quite an overreaction. The comment above was simply stating that we aren't able to help diagnose Lombok issues, but there is a note in the changelog that looks like it might be relevant.

Far from trying to decentivize projects from being clear about changes, we were trying to draw attention to the line in the changelog that looked relevant.