Lombok @Data not generating getters and setters when compiled with Maven

77 views Asked by At

When running mvn install from the terminal or though eclipse, I get a plethora of cannot find symbol errors for methods that should be generated by @Data that did not exist yesterday when the same project was compiled. I am not sure what changed or why is suddenly failed after running + mvn clean. Java version: 1.8.0_341. Maven version 3.9.2. Lombok 1.18.30. Eclipse plugin has no problem recognising the Lombok generated methods. Upgrading Java is not an option at the moment.

pom.xml

<?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 http://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>2.5.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.company.monitoring</groupId>
    <artifactId>company-monitoring</artifactId>
    <version>1.0.12</version>
    <packaging>war</packaging>
    <name>company File Monitoring Dashboard</name>
    <description>Flexible dashboard for monitoring incoming and outgoing files</description>


<properties>
    <java.version>1.8</java.version>
    <!-- Web dependencies -->
    <webjars-bootstrap.version>3.4.1</webjars-bootstrap.version>
    <webjars-jquery-ui.version>1.12.1</webjars-jquery-ui.version>
    <webjars-jquery.version>2.2.3</webjars-jquery.version>
    <webjars-font-awesome.version>4.6.3</webjars-font-awesome.version>
    <webjars-datepicker.version>1.9.0</webjars-datepicker.version>
    <webjars-datetimepicker.version>2.5.1</webjars-datetimepicker.version>
    <webjars-momentjs.version>2.24.0</webjars-momentjs.version>
    <thymeleaf-layout-dialect.version>2.4.1</thymeleaf-layout-dialect.version>
    <commons-lang.version>2.6</commons-lang.version>
    <commons-compress.version>1.18</commons-compress.version>
    <poi.version>4.1.1</poi.version>
    <oracle.jdbc.driver.version>12.1.0</oracle.jdbc.driver.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity5 -->
    <dependency>
        <groupId>org.thymeleaf.extras</groupId>
        <artifactId>thymeleaf-extras-springsecurity5</artifactId>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-config -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>5.2.1.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-ldap -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-ldap</artifactId>
        <version>5.2.1.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-web -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>5.2.1.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-core -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>5.2.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-csv</artifactId>       
        <version>2.5.3</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-webflux</artifactId>
    </dependency>
    
    <dependency>
        <groupId>com.splunk</groupId>
        <artifactId>splunk</artifactId>
        <version>1.6.0.0</version>
    </dependency>
    
    <!-- webjars -->
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>webjars-locator-core</artifactId>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>jquery</artifactId>
        <version>${webjars-jquery.version}</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>jquery-ui</artifactId>
        <version>${webjars-jquery-ui.version}</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootstrap</artifactId>
        <version>${webjars-bootstrap.version}</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>font-awesome</artifactId>
        <version>${webjars-font-awesome.version}</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>momentjs</artifactId>
        <version>${webjars-momentjs.version}</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootstrap-datepicker</artifactId>
        <version>${webjars-datepicker.version}</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>datetimepicker</artifactId>
        <version>${webjars-datetimepicker.version}</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>nprogress</artifactId>
        <version>0.2.0</version>
    </dependency>
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>iCheck</artifactId>
        <version>1.0.2</version>
    </dependency>

    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>datatables</artifactId>
        <version>1.10.19</version>
    </dependency>
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>datatables.net-bs</artifactId>
        <version>2.1.1</version>
    </dependency>
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>datatables.net-fixedheader</artifactId>
        <version>3.1.3</version>
    </dependency>
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>datatables.net-buttons</artifactId>
        <version>1.5.3</version>
    </dependency>
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>datatables.net-responsive-bs</artifactId>
        <version>2.2.3</version>
        <exclusions>
            <exclusion>
                <groupId>org.webjars.bower</groupId>
                <artifactId>datatables.net-responsive</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    
    <!-- https://mvnrepository.com/artifact/org.webjars.bower/datatables.net-responsive -->
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>datatables.net-responsive</artifactId>
        <version>2.2.0</version>
    </dependency>
    
    
    <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>datatables.net-scroller</artifactId>
        <version>2.0.0</version>
    </dependency>
    <!-- end of webjars -->
    
    <dependency>
        <groupId>nz.net.ultraq.thymeleaf</groupId>
        <artifactId>thymeleaf-layout-dialect</artifactId>
        <version>${thymeleaf-layout-dialect.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
    </dependency>
     <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <scope>runtime</scope>
    </dependency> 
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-test</artifactId>
    </dependency>
    <!-- Snowflake JDBC driver -->
    <dependency>
        <groupId>net.snowflake</groupId>
        <artifactId>snowflake-jdbc</artifactId>
        <version>3.14.4</version>
    </dependency>
    <!-- Oracle JDBC driver -->
    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc7</artifactId>
        <version>${oracle.jdbc.driver.version}</version>
    </dependency>
    <!-- This dependency is for interacting with microsoft sql servers -->
    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-csv -->
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>1.4</version>
    </dependency>
    
    <!-- Commons Lang -->
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>${commons-lang.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
    </dependency>
    
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>${commons-compress.version}</version>
    </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>1.18.30</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>2.0.0.Final</version>
    </dependency>
    <!-- Apache Poi -->
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi</artifactId>
        <version>${poi.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>${poi.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.xmlbeans</groupId>
        <artifactId>xmlbeans</artifactId>
        <version>3.1.0</version>
    </dependency>
    
    <!-- https://mvnrepository.com/artifact/junit/junit -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
        <version>4.13.2</version>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <executions>
              <execution>
                <!-- Spring Boot Actuator displays build-related information
                 if a META-INF/build-info.properties file is present -->
                <goals>
                  <goal>build-info</goal>
                </goals>
                <configuration>
                  <additionalProperties>
                    <encoding.source>${project.build.sourceEncoding}</encoding.source>
                    <encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
                    <java.source>${maven.compiler.source}</java.source>
                    <java.target>${maven.compiler.target}</java.target>
                  </additionalProperties>
                </configuration>
              </execution>
            </executions>
        </plugin>
    </plugins>
</build>

OutboundFile.java

import lombok.Data;

@Data
public class OutboundFile {

    // LOB,Client,ProcessID,Records,Application,Occurrence,Day,Time
    private String datafeedName;
    private String displayName;
    private String dataFile;
    private String source;
    private Integer recCount;
    @WebLabel("Date")
    private String insertDt;
    private String frequency;
    private String day;
    private String jobStatus;


}

Error

cannot find symbol
[ERROR]   symbol:   method getDay()
[ERROR]   location: class com.company.monitoring.domain.enrollment.OutboundFile
0

There are 0 answers