GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-1661

groovy-eclipse-compiler Project Lombok integration not working anymore

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0.Release
    • Fix Version/s: 2.9.0.Release
    • Component/s: Maven integration
    • Labels:
      None
    • Environment:
      Apache Maven 3.0.5
      Java version: 1.7.0_21, vendor: Oracle Corporation
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      After upgrading the "groovy-eclipse-compiler" from version "2.7.0-01" to version "2.8.0-01" the project lombok integration stopped working:

      D:\development\eclipse-projects\LombokTest>mvn clean test -e
      [INFO] Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building LombokTest 0.0.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-clean-plugin:2.4.1:clean (default-clean) @ LombokTest —
      [INFO] Deleting D:\development\eclipse-projects\LombokTest\target
      [INFO]
      [INFO] — maven-resources-plugin:2.5:resources (default-resources) @ LombokTest —
      [debug] execute contextualize
      [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] skip non existing resourceDirectory D:\development\eclipse-projects\LombokTest\src\main\resources
      [INFO]
      [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ LombokTest —
      [INFO] Changes detected - recompiling the module!
      [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
      [INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
      [INFO] Classpath: D:\development\eclipse-projects\LombokTest\target\classes;C:\Dokumente und Einstellungen\Pascal Schumacher\.m2\r
      epository\org\codehaus\groovy\groovy-all\2.1.5\groovy-all-2.1.5.jar;C:\Dokumente und Einstellungen\Pascal Schumacher\.m2\repositor
      y\org\projectlombok\lombok\0.11.8\lombok-0.11.8.jar;C:\Dokumente und Einstellungen\Pascal Schumacher\.m2\repository\junit\junit\4.
      8.1\junit-4.8.1.jar;
      [INFO] All args: [-cp, D:\development\eclipse-projects\LombokTest\target\classes;C:\Dokumente und Einstellungen\Pascal Schumacher\
      .m2\repository\org\codehaus\groovy\groovy-all\2.1.5\groovy-all-2.1.5.jar;C:\Dokumente und Einstellungen\Pascal Schumacher\.m2\repo
      sitory\org\projectlombok\lombok\0.11.8\lombok-0.11.8.jar;C:\Dokumente und Einstellungen\Pascal Schumacher\.m2\repository\junit\jun
      it\4.8.1\junit-4.8.1.jar;, -d, D:\development\eclipse-projects\LombokTest\target\classes, -g, -s, D:\development\eclipse-projects\
      LombokTest\target\generated-sources\annotations, -source, 1.5, -target, 1.5, -nowarn, -verbose, D:\development\eclipse-projects\Lo
      mbokTest\src\main\java\test\DataTest.java]
      [INFO] Found location <C:\Dokumente und Einstellungen\Pascal Schumacher\.m2\repository\org\codehaus\groovy\groovy-eclipse-batch\2.
      1.5-03\groovy-eclipse-batch-2.1.5-03.jar> for className <org.eclipse.jdt.internal.compiler.batch.Main>
      [INFO] Found location <C:\Dokumente und Einstellungen\Pascal Schumacher\.m2\repository\org\projectlombok\lombok\0.11.8\lombok-0.11
      .8.jar> for className <lombok.core.Agent>
      [INFO] Compiling in a forked process using C:\Dokumente und Einstellungen\Pascal Schumacher\.m2\repository\org\codehaus\groovy\gro
      ovy-eclipse-batch\2.1.5-03\groovy-eclipse-batch-2.1.5-03.jar
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3.640s
      [INFO] Finished at: Tue Jul 09 00:26:43 CEST 2013
      [INFO] Final Memory: 5M/15M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LombokTest:
      Compilation failure -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:
      compile (default-compile) on project LombokTest: Compilation failure
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
      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:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
      at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:862)
      at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more
      [ERROR]
      [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

      See attached example project.

        Activity

        Hide
        Andrew Eisenberg added a comment -

        Thanks for the bug report. Our integration tests are testing lombock with no problem. Maybe there's something different about your project. Will try it out.

        Show
        Andrew Eisenberg added a comment - Thanks for the bug report. Our integration tests are testing lombock with no problem. Maybe there's something different about your project. Will try it out.
        Hide
        Andrew Eisenberg added a comment -

        Can you try the latest 2.9.0-01-SNAPSHOT? I just pushed out a fix that is making your project compile for me.

        Show
        Andrew Eisenberg added a comment - Can you try the latest 2.9.0-01-SNAPSHOT? I just pushed out a fix that is making your project compile for me.
        Hide
        Pascal Schumacher added a comment -

        With 2.9.0-01-SNAPSHOT the build works again. Thanks for the super quick fix.

        Show
        Pascal Schumacher added a comment - With 2.9.0-01-SNAPSHOT the build works again. Thanks for the super quick fix.
        Hide
        Andrew Eisenberg added a comment -

        Thanks for the feedback. Resolving.

        Show
        Andrew Eisenberg added a comment - Thanks for the feedback. Resolving.
        Hide
        Sean Flanigan added a comment -

        Could you please put out some sort of release with this fix? A 2.8 backport, even a 2.9 alpha release, anything! 2.9.0-01 is quite a way off.

        Show
        Sean Flanigan added a comment - Could you please put out some sort of release with this fix? A 2.8 backport, even a 2.9 alpha release, anything! 2.9.0-01 is quite a way off.
        Hide
        Antony Stubbs added a comment -

        What was the problem?

        Show
        Antony Stubbs added a comment - What was the problem?
        Hide
        Sean Flanigan added a comment -

        Just the "Compilation failure" stacktrace shown in the bug report, when Lombok is added to the mix. The details of the compilation failure are not logged.

        Show
        Sean Flanigan added a comment - Just the "Compilation failure" stacktrace shown in the bug report, when Lombok is added to the mix. The details of the compilation failure are not logged.
        Hide
        Antony Stubbs added a comment -

        Right, but the reporter didn't specify that the upgrade enabled him to see what the root cause was, so he could fix it, he just said it worked after upgrading to the snapshot.

        We were seeing the same stacktrace sort of thing, upgraded to the snapshot and everything "just worked".

        Or are you saying, there was a problem (not the problem that the problem wasn't properly reported), and that the upgrade fixed the underlying problem?

        If so, is there a reason that the compilation failures aren't logged properly?

        Show
        Antony Stubbs added a comment - Right, but the reporter didn't specify that the upgrade enabled him to see what the root cause was, so he could fix it, he just said it worked after upgrading to the snapshot. We were seeing the same stacktrace sort of thing, upgraded to the snapshot and everything "just worked". Or are you saying, there was a problem (not the problem that the problem wasn't properly reported), and that the upgrade fixed the underlying problem? If so, is there a reason that the compilation failures aren't logged properly?
        Hide
        Sean Flanigan added a comment -

        Um, Antony, I don't think I'm following you. The SNAPSHOT fixes the problem for me too, whatever the cause. I'm just hoping there is a non-SNAPSHOT release soon.

        Oh, I get it: you were asking Andrew about the problem in the code. I thought you were asking me for more details from an end-user point of view.

        But yes, better logging for compilation errors would certainly have saved some time.

        It looks like this was the fix (one line): https://github.com/groovy/groovy-eclipse/commit/92b8f13bcc7be18491fb389122f896851f0b2970

        Show
        Sean Flanigan added a comment - Um, Antony, I don't think I'm following you. The SNAPSHOT fixes the problem for me too, whatever the cause. I'm just hoping there is a non-SNAPSHOT release soon. Oh, I get it: you were asking Andrew about the problem in the code. I thought you were asking me for more details from an end-user point of view. But yes, better logging for compilation errors would certainly have saved some time. It looks like this was the fix (one line): https://github.com/groovy/groovy-eclipse/commit/92b8f13bcc7be18491fb389122f896851f0b2970

          People

          • Assignee:
            Andrew Eisenberg
            Reporter:
            Pascal Schumacher
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: