Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-31214

Problems in Nexus Staging Maven Plugin 1.6.10

    Details

    • Story Points:
      2
    • Sprint:
      NXRM Immortals Sprint 29
    • Notability:
      2
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      After the Jackson problems in 1.6.9 were fixed in 1.6.10, I still cannot use the plugin:

      $ mvn -DskipTests -P release-sign-artifacts nexus-staging:rc-list
      
      [INFO] --- nexus-staging-maven-plugin:1.6.10:rc-list (default-cli) @ aspectj-maven-plugin ---
      [INFO] + Using server credentials "ossrh" from Maven settings.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 13.952 s
      [INFO] Finished at: 2022-02-14T08:32:36+07:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.10:rc-list (default-cli) on project aspectj-maven-plugin: Nexus connection problem: Nexus connection problem to URL [https://s01.oss.sonatype.org/ ]: XPP3 pull parser library not present. Specify another driver. For example: new XStream(new DomDriver()): org.xmlpull.mxp1.MXParser -> [Help 1]
      

      To me it looks as if nobody tests the plugin before releasing it. I might be wrong of course, but how can problems like in 1.6.9 and 1.6.10 stay undetected?

      If you look into XStream 1.4.19's POM, you see

      <dependency>
        <groupId>xpp3</groupId>
        <artifactId>xpp3_min</artifactId>
        <optional>true</optional>
      </dependency>
      

      If Nexus Staging Maven Plugin actively uses the optional XPP3, it should declare it as a dependency.

      In the XStream parent POM, you see the version used:

      <version.xpp3>1.1.4c</version.xpp3>
      

      But even if I add XPP version as a plugin dependency, the next problem occurs:

      $ mvn -e -DskipTests -P release-sign-artifacts nexus-staging:rc-list
      
      [INFO] --- nexus-staging-maven-plugin:1.6.10:rc-list (default-cli) @ aspectj-maven-plugin ---
      [INFO]  + Using server credentials "ossrh" from Maven settings.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  6.393 s
      [INFO] Finished at: 2022-02-14T09:10:18+07:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.10:rc-list (default-cli) on project aspectj-maven-plugin: Nexus connection problem: Nexus connection problem to URL [https://s01.oss.sonatype.org/ ]: org.sonatype.nexus.rest.model.StatusResourceResponse -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.10:rc-list (default-cli) on project aspectj-maven-plugin: Nexus connection problem: Nexus connection problem to URL [https://s01.oss.sonatype.org/ ]: org.sonatype.nexus.rest.model.StatusResourceResponse
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          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:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Nexus connection problem: Nexus connection problem to URL [https://s01.oss.sonatype.org/ ]: org.sonatype.nexus.rest.model.StatusResourceResponse
          at org.sonatype.nexus.maven.staging.workflow.AbstractStagingActionMojo.createStagingWorkflowService (AbstractStagingActionMojo.java:97)
          at org.sonatype.nexus.maven.staging.workflow.AbstractStagingActionMojo.execute (AbstractStagingActionMojo.java:52)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          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:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: java.lang.IllegalArgumentException: Nexus connection problem to URL [https://s01.oss.sonatype.org/ ]: org.sonatype.nexus.rest.model.StatusResourceResponse
          at org.sonatype.nexus.maven.staging.remote.RemoteNexus.createNexusClient (RemoteNexus.java:207)
          at org.sonatype.nexus.maven.staging.remote.RemoteNexus.<init> (RemoteNexus.java:102)
          at org.sonatype.nexus.maven.staging.workflow.AbstractStagingActionMojo.createStagingWorkflowService (AbstractStagingActionMojo.java:93)
          at org.sonatype.nexus.maven.staging.workflow.AbstractStagingActionMojo.execute (AbstractStagingActionMojo.java:52)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          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:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: com.thoughtworks.xstream.security.ForbiddenClassException: org.sonatype.nexus.rest.model.StatusResourceResponse
          at com.thoughtworks.xstream.security.NoTypePermission.allows (NoTypePermission.java:26)
          at com.thoughtworks.xstream.mapper.SecurityMapper.realClass (SecurityMapper.java:74)
          at com.thoughtworks.xstream.mapper.MapperWrapper.realClass (MapperWrapper.java:125)
          at com.thoughtworks.xstream.mapper.CachingMapper.realClass (CachingMapper.java:47)
          at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType (HierarchicalStreams.java:29)
          at com.thoughtworks.xstream.core.TreeUnmarshaller.start (TreeUnmarshaller.java:135)
          at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal (AbstractTreeMarshallingStrategy.java:32)
          at com.thoughtworks.xstream.XStream.unmarshal (XStream.java:1421)
          at com.thoughtworks.xstream.XStream.unmarshal (XStream.java:1399)
          at com.thoughtworks.xstream.XStream.fromXML (XStream.java:1284)
          at org.sonatype.nexus.client.internal.rest.XStreamXmlProvider.readFrom (XStreamXmlProvider.java:83)
          at com.sun.jersey.api.client.ClientResponse.getEntity (ClientResponse.java:565)
          at com.sun.jersey.api.client.ClientResponse.getEntity (ClientResponse.java:517)
          at com.sun.jersey.api.client.WebResource.handle (WebResource.java:684)
          at com.sun.jersey.api.client.WebResource.access$200 (WebResource.java:74)
          at com.sun.jersey.api.client.WebResource$Builder.get (WebResource.java:507)
          at org.sonatype.nexus.client.rest.jersey.JerseyNexusClient.getStatus (JerseyNexusClient.java:147)
          at org.sonatype.nexus.client.internal.rest.AbstractNexusClient.initializeConnection (AbstractNexusClient.java:86)
          at org.sonatype.nexus.client.rest.jersey.JerseyNexusClient.<init> (JerseyNexusClient.java:90)
          at org.sonatype.nexus.client.rest.jersey.NexusClientFactoryImpl.createFor (NexusClientFactoryImpl.java:125)
          at org.sonatype.nexus.maven.staging.remote.RemoteNexus.createNexusClient (RemoteNexus.java:193)
          at org.sonatype.nexus.maven.staging.remote.RemoteNexus.<init> (RemoteNexus.java:102)
          at org.sonatype.nexus.maven.staging.workflow.AbstractStagingActionMojo.createStagingWorkflowService (AbstractStagingActionMojo.java:93)
          at org.sonatype.nexus.maven.staging.workflow.AbstractStagingActionMojo.execute (AbstractStagingActionMojo.java:52)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          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:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      

      I have no idea why it cannot connect. The web UI on that URL is available, I can log in normally. Reverting to 1.6.8 with an explicit XStream 1.4.15 plugin dependency also makes it work again. So it is not anything like a temporary server problem. Probably as a plugin maintainer you know better what an XStream ForbiddenClassException means, but I guess you need to add at least org.sonatype.nexus.rest.model.StatusResourceResponse to the list of permitted classes, maybe several more if you want to cover all plugin goals.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nblair Nicholas Blair
              Reporter:
              kriegaex Alexander Kriegisch
              Last Updated By:
              Rich Seddon Rich Seddon
              Team:
              NXRM - Optimus
              Votes:
              8 Vote for this issue
              Watchers:
              22 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title