[ https://issues.apache.org/jira/browse/MPLUGIN-524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848097#comment-17848097 ]
Tamas Cservenak commented on MPLUGIN-524: ----------------------------------------- Just take a peek at stack trace: * {{org.sonatype.nexus.maven.staging.deploy.strategy.AbstractDeployStrategy.deployUp}} initiates a deploy * goes thru {{org.eclipse.aether.internal.impl.DefaultDeployer}} * and then resolver ends up here, in a Maven2 class [https://github.com/apache/maven/blob/master/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java] * hence, it means that DeployRequest.metadata contained this Maven2 class, and request was created by offender in first bullet > "org.apache.maven.artifact.repository.metadata.Plugin.getPrefix() is null" > with Nexus Staging plugin > ---------------------------------------------------------------------------------------------------- > > Key: MPLUGIN-524 > URL: https://issues.apache.org/jira/browse/MPLUGIN-524 > Project: Maven Plugin Tools > Issue Type: Bug > Components: Metadata Model > Affects Versions: 3.13.0 > Reporter: Tristan Tarrant > Priority: Major > > While attempting to release a plugin with nexus-staging-maven-plugin, I get > the following exception: > {noformat} > [ERROR] Failed to execute goal > org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy > (injected-nexus-deploy) on project proto-schema-compatibility-maven-plugin: > Failed to update metadata org.infinispan.maven-plugins/maven-metadata.xml: > Cannot invoke "String.equals(Object)" because the return value of > "org.apache.maven.artifact.repository.metadata.Plugin.getPrefix()" is null -> > [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy > (injected-nexus-deploy) on project proto-schema-compatibility-maven-plugin: > Failed to update metadata org.infinispan.maven-plugins/maven-metadata.xml: > Cannot invoke "String.equals(Object)" because the return value of > "org.apache.maven.artifact.repository.metadata.Plugin.getP refix()" is null > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:333) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) > at jdk.internal.reflect.DirectMethodHandleAccessor.invoke > (DirectMethodHandleAccessor.java:103) > at java.lang.reflect.Method.invoke (Method.java:580) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:283) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:226) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:407) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:348) > Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to update > metadata org.infinispan.maven-plugins/maven-metadata.xml: Cannot invoke > "String.equals(Object)" because the return value of > "org.apache.maven.artifact.repository.metadata.Plugin.getPrefix()" is null > at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute > (DeployMojo.java:216) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:126) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:328) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) > at jdk.internal.reflect.DirectMethodHandleAccessor.invoke > (DirectMethodHandleAccessor.java:103) > at java.lang.reflect.Method.invoke (Method.java:580) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:283) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:226) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:407) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:348) > Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: > Failed to update metadata org.infinispan.maven-plugins/maven-metadata.xml: > Cannot invoke "String.equals(Object)" because the return value of > "org.apache.maven.artifact.repository.metadata.Plugin.getPrefix()" is null > at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy > (DefaultArtifactDeployer.java:133) > at > org.sonatype.nexus.maven.staging.deploy.strategy.AbstractDeployStrategy.deployUp > (AbstractDeployStrategy.java:213) > at > org.sonatype.nexus.maven.staging.deploy.strategy.DeferredDeployStrategy.finalizeDeploy > (DeferredDeployStrategy.java:86) > at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute > (DeployMojo.java:213) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:126) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:328) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) > at jdk.internal.reflect.DirectMethodHandleAccessor.invoke > (DirectMethodHandleAccessor.java:103) > at java.lang.reflect.Method.invoke (Method.java:580) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:283) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:226) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:407) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:348) > Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to > update metadata org.infinispan.maven-plugins/maven-metadata.xml: Cannot > invoke "String.equals(Object)" because the return value of > "org.apache.maven.artifact.repository.metadata.Plugin.getPrefix()" is null > at org.eclipse.aether.internal.impl.DefaultDeployer.upload > (DefaultDeployer.java:401) > at org.eclipse.aether.internal.impl.DefaultDeployer.deploy > (DefaultDeployer.java:294) > at org.eclipse.aether.internal.impl.DefaultDeployer.deploy > (DefaultDeployer.java:202) > at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy > (DefaultRepositorySystem.java:393) > at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy > (DefaultArtifactDeployer.java:131) > at > org.sonatype.nexus.maven.staging.deploy.strategy.AbstractDeployStrategy.deployUp > (AbstractDeployStrategy.java:213) > at > org.sonatype.nexus.maven.staging.deploy.strategy.DeferredDeployStrategy.finalizeDeploy > (DeferredDeployStrategy.java:86) > at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute > (DeployMojo.java:213) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:126) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:328) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) > at jdk.internal.reflect.DirectMethodHandleAccessor.invoke > (DirectMethodHandleAccessor.java:103) > at java.lang.reflect.Method.invoke (Method.java:580) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:283) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:226) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:407) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:348) > Caused by: org.eclipse.aether.RepositoryException: Cannot invoke > "String.equals(Object)" because the return value of > "org.apache.maven.artifact.repository.metadata.Plugin.getPrefix()" is null > at org.apache.maven.artifact.repository.metadata.MetadataBridge.merge > (MetadataBridge.java:59) > at org.eclipse.aether.internal.impl.DefaultDeployer.upload > (DefaultDeployer.java:399) > at org.eclipse.aether.internal.impl.DefaultDeployer.deploy > (DefaultDeployer.java:294) > at org.eclipse.aether.internal.impl.DefaultDeployer.deploy > (DefaultDeployer.java:202) > at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy > (DefaultRepositorySystem.java:393) > at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy > (DefaultArtifactDeployer.java:131) > at > org.sonatype.nexus.maven.staging.deploy.strategy.AbstractDeployStrategy.deployUp > (AbstractDeployStrategy.java:213) > at > org.sonatype.nexus.maven.staging.deploy.strategy.DeferredDeployStrategy.finalizeDeploy > (DeferredDeployStrategy.java:86) > at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute > (DeployMojo.java:213) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:126) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:328) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) > at jdk.internal.reflect.DirectMethodHandleAccessor.invoke > (DirectMethodHandleAccessor.java:103) > at java.lang.reflect.Method.invoke (Method.java:580) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:283) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:226) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:407) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:348) > Caused by: java.lang.NullPointerException: Cannot invoke > "String.equals(Object)" because the return value of > "org.apache.maven.artifact.repository.metadata.Plugin.getPrefix()" is null > at org.apache.maven.artifact.repository.metadata.Metadata.merge > (Metadata.java:293) > at > org.apache.maven.artifact.repository.metadata.AbstractRepositoryMetadata.updateRepositoryMetadata > (AbstractRepositoryMetadata.java:99) > at > org.apache.maven.artifact.repository.metadata.AbstractRepositoryMetadata.storeInLocalRepository > (AbstractRepositoryMetadata.java:59) > at org.apache.maven.artifact.repository.metadata.MetadataBridge.merge > (MetadataBridge.java:56) > at org.eclipse.aether.internal.impl.DefaultDeployer.upload > (DefaultDeployer.java:399) > at org.eclipse.aether.internal.impl.DefaultDeployer.deploy > (DefaultDeployer.java:294) > at org.eclipse.aether.internal.impl.DefaultDeployer.deploy > (DefaultDeployer.java:202) > at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy > (DefaultRepositorySystem.java:393) > at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy > (DefaultArtifactDeployer.java:131) > at > org.sonatype.nexus.maven.staging.deploy.strategy.AbstractDeployStrategy.deployUp > (AbstractDeployStrategy.java:213) > at > org.sonatype.nexus.maven.staging.deploy.strategy.DeferredDeployStrategy.finalizeDeploy > (DeferredDeployStrategy.java:86) > at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute > (DeployMojo.java:213) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:126) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:328) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) > at jdk.internal.reflect.DirectMethodHandleAccessor.invoke > (DirectMethodHandleAccessor.java:103) > at java.lang.reflect.Method.invoke (Method.java:580) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:283) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:226) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:407) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:348) > {noformat} > Downgrading to 3.12.0 works fine. The bug is similar to MPLUGIN-384 and I > suspect it was introduced with MPLUGIN-520. -- This message was sent by Atlassian Jira (v8.20.10#820010)