Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-272

Descriptor goal fail with java 8 and interface with default method: upgrade QDox

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.4
    • Component/s: Plugin Plugin
    • Labels:
      None
    • Environment:

      Description

      Hi All,

      It seems that the descriptor goal of "maven-plugin-plugin" version 3.3 is failing with java 8 and an interface with a default method.

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor (default-descriptor) on project test-plugin: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor failed: syntax error @[12,1] in file:/C:/Users/clement.agarini/git/test-plugin/src/main/java/fr/ca/TestInterface.java -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor (default-descriptor) on project test-plugin: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor failed: syntax error @[12,1] in file:/C:/Users/IBM_ADMIN/git/test-plugin/src/main/java/fr/ca/TestInterface.java
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
      	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:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	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)
      	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
      	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:483)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor failed: syntax error @[12,1] in file:/C:/Users/IBM_ADMIN/git/test-plugin/src/main/java/fr/ca/TestInterface.java
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      	... 25 more
      Caused by: com.thoughtworks.qdox.parser.ParseException: syntax error @[12,1] in file:/C:/Users/IBM_ADMIN/git/test-plugin/src/main/java/fr/ca/TestInterface.java
      	at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:1018)
      	at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1324)
      	at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
      	at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
      	at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:388)
      	at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:384)
      	at com.thoughtworks.qdox.JavaDocBuilder$2.visitFile(JavaDocBuilder.java:474)
      	at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:43)
      	at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      	at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      	at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      	at com.thoughtworks.qdox.directorywalker.DirectoryScanner.scan(DirectoryScanner.java:52)
      	at com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:471)
      	at com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:460)
      	at org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor.discoverClasses(JavaMojoDescriptorExtractor.java:713)
      	at org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor.execute(JavaMojoDescriptorExtractor.java:676)
      	at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:96)
      	at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:243)
      	at org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:90)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      	... 26 more
      

      I tried to remove this default method in "TestInterface" and use a method without implementation and it worked properly.

      So, How to reproduce:

      Download an use an Oracle JDK8.

      Download the attached zip file.

      Just run "mvn install".

      Thanks in advance,
      Clement

        Attachments

        1. test-plugin.zip
          3 kB
          Clément Agarini

          Activity

            People

            • Assignee:
              rfscholte Robert Scholte
              Reporter:
              clement.agarini Clément Agarini
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: