title: Google errorprone java compiler - Bugs during maven build: java.lang.NoSuchFieldError: pid
body: <p>I have added the following to the pom file: </p>
  
  <pre><code>&lt;!-- Source: http://errorprone.info/docs/installation --&gt;
  &lt;build&gt;
      &lt;plugins&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.3&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;compilerId&gt;javac-with-errorprone&lt;/compilerId&gt;
                  &lt;forceJavacCompilerUse&gt;true&lt;/forceJavacCompilerUse&gt;
                  &lt;!-- maven-compiler-plugin defaults to targeting Java 5, but our javac
                       only supports &gt;=6 --&gt;
                  &lt;source&gt;8&lt;/source&gt;
                  &lt;target&gt;8&lt;/target&gt;
              &lt;/configuration&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.codehaus.plexus&lt;/groupId&gt;
                      &lt;artifactId&gt;plexus-compiler-javac-errorprone&lt;/artifactId&gt;
                      &lt;version&gt;2.5&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;!-- override plexus-compiler-javac-errorprone's dependency on
                       Error Prone with the latest version --&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.google.errorprone&lt;/groupId&gt;
                      &lt;artifactId&gt;error_prone_core&lt;/artifactId&gt;
                      &lt;version&gt;2.0.4&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Which during maven clean install leads to: </p>
  
  <pre><code>An annotation processor threw an uncaught exception.
  Consult the following stack trace for details.
  java.lang.NoSuchFieldError: pid
      at lombok.javac.JavacAST.packageDeclaration(JavacAST.java:107)
      at lombok.javac.JavacAST.&lt;init&gt;(JavacAST.java:81)
      at lombok.javac.JavacTransformer.transform(JavacTransformer.java:67)
      at lombok.javac.apt.Processor.process(Processor.java:250)
      at lombok.core.AnnotationProcessor$JavacDescriptor.process(AnnotationProcessor.java:115)
      at lombok.core.AnnotationProcessor.process(AnnotationProcessor.java:165)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:801)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:713)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2000(JavacProcessingEnvironment.java:91)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1021)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1129)
      at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1141)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:833)
      at com.sun.tools.javac.main.Main.compile(Main.java:249)
      at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:220)
      at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:158)
      at com.google.errorprone.ErrorProneCompiler.compile(ErrorProneCompiler.java:87)
      at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne$CompilerInvoker.compile(JavacCompilerWithErrorProne.java:219)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne.performCompile(JavacCompilerWithErrorProne.java:91)
      at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:825)
      at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  [DEBUG] incrementalBuildHelper#afterRebuildExecution
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>...</p>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal
    org.apache.maven.plugins:maven-compiler-plugin:3.3:compile
    (default-compile) on project Core: Compilation failure -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
    execute goal
    org.apache.maven.plugins:maven-compiler-plugin:3.3:compile
    (default-compile) on project Core: Compilation failure    at
    org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
      at
    org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at
    org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at
    org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at
    org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at
    org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at
    org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)   at
    org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)  at
    org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)  at
    org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)   at
    org.apache.maven.cli.MavenCli.main(MavenCli.java:158)     at
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)     at
    org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at
    org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at
    org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at
    org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by:
    org.apache.maven.plugin.compiler.CompilationFailureException:
    Compilation failure   at
    org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:915)
      at
    org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
      at
    org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      at
    org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      ... 19 more [ERROR]</p>
  </blockquote>
  
  <p>Hmm.. I notice just now that it is comlaining with regards to a lombok related AST stuff. </p>
  
  <p><strong>Does errorprone and lombok not work well together?</strong> </p>
  
  <p><strong>What can I do to resolve this issue?</strong> </p>