title: MapStruct and Lombok not working together
body: <p>Tech Stack being used : </p>
  
  <p>Java 8
  MapStruct : 1.2.0.Final
  Lombok: 1.16.18
  IDE: IntelliJ - Lombok Plugin already installed </p>
  
  <ul>
  <li>Initially, I faced issues when I removed getters and setters and added <code>@Getter</code> and <code>@Setter</code> annotation, <code>mapstruct</code> is not able to find the property and says: <code>Unknown property "id" in result type com.vg.once.dto.OneDto. Did you mean "null"?</code></li>
  <li>I came to know that Lombok 1.16.14 or newer along with MapStruct 1.2.0.Beta1 or newer are compatible and can work together, but my versions are newer then the desired still the issue is arising.</li>
  <li>One more solution that I have already tried is running Lombok's Delombok plugin, but still, the same issue is arising. </li>
  </ul>
  
  <p>Below are the project files :</p>
  
  <p>The Entity Object: <strong>One.java</strong>:</p>
  
  <pre><code>import lombok.Getter;
  import lombok.Setter;
  
  @Getter
  @Setter
  public class One {
  
      private int id;
      private Integer version;
      private int projectId;
      private String title;
      private String code;
      private int sortOrder;
  
  }
  </code></pre>
  
  <p>The DTO Object: <strong>OneDTO.java</strong> :</p>
  
  <pre><code>import lombok.Getter;
  import lombok.Setter;
  
  @Getter
  @Setter
  public class OneDto {
  
      private int id;
      private Integer version;
      private int projectId;
      private String title;
      private String code;
      private int sortOrder;
  
  }
  </code></pre>
  
  <p>Mapper Class : <strong>OneMapper.java</strong></p>
  
  <pre><code>import org.mapstruct.Mapper;
  import org.mapstruct.Mapping;
  
  import com.vg.once.dto.OneDto;
  import com.vg.once.entity.One;
  
  @Mapper
  public interface OneMapper {
  
      @Mapping(target="id", source="one.id")
      OneDto createOne (One one);
  
  }
  </code></pre>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&lt;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"&gt;
  
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.vg&lt;/groupId&gt;
    &lt;artifactId&gt;mapstruct&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;Mapstruct-test&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;org.mapstruct.version&gt;1.2.0.Final&lt;/org.mapstruct.version&gt;
          &lt;org.projectlombok.version&gt;1.16.18&lt;/org.projectlombok.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
              &lt;version&gt;${org.projectlombok.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mapstruct&lt;/groupId&gt;
              &lt;artifactId&gt;mapstruct-jdk8&lt;/artifactId&gt;
              &lt;version&gt;${org.mapstruct.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt; 
           &lt;plugin&gt;
                  &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
                  &lt;artifactId&gt;lombok-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.16.18.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;generate-sources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;delombok&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;sourceDirectory&gt;src/main/java&lt;/sourceDirectory&gt;
                      &lt;addOutputDirectory&gt;false&lt;/addOutputDirectory&gt;
                      &lt;outputDirectory&gt;${project.build.directory}/delombok&lt;/outputDirectory&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                      &lt;skip&gt;false&lt;/skip&gt;
                      &lt;verbose&gt;false&lt;/verbose&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;       
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.6.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.version}&lt;/source&gt;
                      &lt;target&gt;${java.version}&lt;/target&gt;
                      &lt;annotationProcessorPaths&gt;
                          &lt;path&gt;
                              &lt;groupId&gt;org.mapstruct&lt;/groupId&gt;
                              &lt;artifactId&gt;mapstruct-processor&lt;/artifactId&gt;
                              &lt;version&gt;${org.mapstruct.version}&lt;/version&gt;
                          &lt;/path&gt;
                      &lt;/annotationProcessorPaths&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>Build Trace</strong>: </p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Mapstruct-test 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- lombok-maven-plugin:1.16.18.1:delombok (default) @ mapstruct ---
  [INFO] Delombok complete.
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ mapstruct ---
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] Copying 0 resource
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ mapstruct ---
  [INFO] Changes detected - recompiling the module!
  [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
  [INFO] Compiling 5 source files to /home/vivekgupta/Documents/workspaces/mapstruct-test/mapstruct/target/classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /home/vivekgupta/Documents/workspaces/mapstruct-test/mapstruct/src/main/java/com/vg/once/mapper/OneMapper.java:[12,9] Unknown property "id" in result type com.vg.once.dto.OneDto. Did you mean "null"?
  [INFO] 1 error
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.637 s
  [INFO] Finished at: 2017-12-06T19:23:53+05:30
  [INFO] Final Memory: 19M/235M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project mapstruct: Compilation failure
  [ERROR] /home/vivekgupta/Documents/workspaces/mapstruct-test/mapstruct/src/main/java/com/vg/once/mapper/OneMapper.java:[12,9] Unknown property "id" in result type com.vg.once.dto.OneDto. Did you mean "null"?
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>
  
  <p>please share how can i get this working using both Lombok and MapStruct together?</p>