Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-571

JDK9: Issue with list goal fails with java.lang.NoSuchMethodException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      Calling:
      mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.1:list

      Fails with the following:

      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Build Order:
      [INFO]
      [INFO] parent
      [INFO] domain
      [INFO] service-client
      [INFO] webgui
      [INFO] service
      [INFO] app
      [INFO] appasm
      [INFO] shade
      [INFO] assembly
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building parent 3.4.6-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-dependency-plugin:3.0.1:list (default-cli) @ parent ---
      [INFO]
      [INFO] The following files have been resolved:
      [INFO]    none
      [INFO]
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building domain 3.4.6-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-dependency-plugin:3.0.1:list (default-cli) @ domain ---
      java.lang.NoSuchMethodException: jdk.internal.module.ModuleReferenceImpl.descriptor()
      	at java.base/java.lang.Class.getDeclaredMethod(Class.java:2451)
      	at org.apache.maven.plugins.dependency.utils.DependencyStatusSets.getModuleDescriptor(DependencyStatusSets.java:272)
      	at org.apache.maven.plugins.dependency.utils.DependencyStatusSets.buildArtifactListOutput(DependencyStatusSets.java:227)
      	at org.apache.maven.plugins.dependency.utils.DependencyStatusSets.getOutput(DependencyStatusSets.java:165)
      	at org.apache.maven.plugins.dependency.resolvers.ResolveDependenciesMojo.doExecute(ResolveDependenciesMojo.java:90)
      	at org.apache.maven.plugins.dependency.AbstractDependencyMojo.execute(AbstractDependencyMojo.java:143)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	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)
      [INFO]
      

        Activity

        Hide
        gboue Guillaume Boué added a comment -

        Fixed in r1799110.

        Show
        gboue Guillaume Boué added a comment - Fixed in r1799110 .
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-plugins #9006 (See https://builds.apache.org/job/maven-plugins/9006/)
        MDEP-571 JDK9: Issue with list goal fails with java.lang.NoSuchMethodException

        Only find public inherited methods through reflection with getMethod instead of getDeclaredMethod. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1799110)

        • (add) maven-dependency-plugin/src/it/projects/mdep-571-list-java9
        • (add) maven-dependency-plugin/src/it/projects/mdep-571-list-java9/invoker.properties
        • (add) maven-dependency-plugin/src/it/projects/mdep-571-list-java9/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/mdep-571-list-java9/verify.groovy
        • (edit) maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/utils/DependencyStatusSets.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #9006 (See https://builds.apache.org/job/maven-plugins/9006/ ) MDEP-571 JDK9: Issue with list goal fails with java.lang.NoSuchMethodException Only find public inherited methods through reflection with getMethod instead of getDeclaredMethod. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1799110 ) (add) maven-dependency-plugin/src/it/projects/mdep-571-list-java9 (add) maven-dependency-plugin/src/it/projects/mdep-571-list-java9/invoker.properties (add) maven-dependency-plugin/src/it/projects/mdep-571-list-java9/pom.xml (add) maven-dependency-plugin/src/it/projects/mdep-571-list-java9/verify.groovy (edit) maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/utils/DependencyStatusSets.java

          People

          • Assignee:
            gboue Guillaume Boué
            Reporter:
            khmarbaise Karl Heinz Marbaise
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development