title: maven release:prepare with NoClassDefFoundError while using git
body: <p>With maven 3.6.1 and maven-release-plugin 2.5.3 when doing a <code>mvn release:prepare</code> I got an exception: </p>
  
  <blockquote>
    <p>java.lang.NoClassDefFoundError: org/apache/maven/scm/command/untag/UntagScmResult</p>
  </blockquote>
  
  <p>Here is my pom.xml relevant part:</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.5.3&lt;/version&gt;
    &lt;configuration&gt;
      &lt;localCheckout&gt;true&lt;/localCheckout&gt;
      &lt;pushChanges&gt;false&lt;/pushChanges&gt;
      &lt;mavenExecutorId&gt;forked-path&lt;/mavenExecutorId&gt;
      &lt;tagNameFormat&gt;V@{project.version}&lt;/tagNameFormat&gt;
      &lt;autoVersionSubmodules&gt;true&lt;/autoVersionSubmodules&gt;
    &lt;/configuration&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.maven.scm&lt;/groupId&gt;
        &lt;artifactId&gt;maven-scm-provider-gitexe&lt;/artifactId&gt;
        &lt;version&gt;1.11.2&lt;/version&gt;
      &lt;/dependency&gt;
  
    &lt;/dependencies&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>And here the full exception:</p>
  
  <pre><code>[WARNING] Error injecting: org.apache.maven.scm.provider.git.gitexe.GitExeScmProvider
  java.lang.NoClassDefFoundError: org/apache/maven/scm/command/untag/UntagScmResult
      at java.lang.Class.getDeclaredMethods0 (Native Method)
      at java.lang.Class.privateGetDeclaredMethods (Class.java:3167)
      at java.lang.Class.getDeclaredMethods (Class.java:2310)
      at com.google.inject.spi.InjectionPoint.getDeclaredMethods (InjectionPoint.java:766)
      at com.google.inject.spi.InjectionPoint.getInjectionPoints (InjectionPoint.java:683)
      at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields (InjectionPoint.java:378)
      at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies (ConstructorBindingImpl.java:182)
      at com.google.inject.internal.InjectorImpl.getInternalDependencies (InjectorImpl.java:661)
      at com.google.inject.internal.InjectorImpl.cleanup (InjectorImpl.java:617)
      at com.google.inject.internal.InjectorImpl.initializeJitBinding (InjectorImpl.java:603)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBinding (InjectorImpl.java:932)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive (InjectorImpl.java:852)
      at com.google.inject.internal.InjectorImpl.getJustInTimeBinding (InjectorImpl.java:291)
      at com.google.inject.internal.InjectorImpl.getBindingOrThrow (InjectorImpl.java:222)
      at com.google.inject.internal.InjectorImpl.getProviderOrThrow (InjectorImpl.java:1040)
      at com.google.inject.internal.InjectorImpl.getProvider (InjectorImpl.java:1071)
      at com.google.inject.internal.InjectorImpl.getProvider (InjectorImpl.java:1034)
      at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
      at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
      at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
      at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
      at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
      at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
      at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision (BeanScheduler.java:230)
      at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:120)
      at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
      at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
      at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
      at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40)
      at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:168)
      at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:39)
      at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
      at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
      at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
      at org.apache.maven.scm.manager.AbstractScmManager.getProviderByType (AbstractScmManager.java:144)
      at org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository (AbstractScmManager.java:202)
      at org.apache.maven.shared.release.scm.DefaultScmRepositoryConfigurator.getConfiguredRepository (DefaultScmRepositoryConfigurator.java:78)
      at org.apache.maven.shared.release.scm.DefaultScmRepositoryConfigurator.getConfiguredRepository (DefaultScmRepositoryConfigurator.java:67)
      at org.apache.maven.shared.release.phase.CheckPomPhase.execute (CheckPomPhase.java:92)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:234)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:169)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:146)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:107)
      at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease (PrepareReleaseMojo.java:286)
      at org.apache.maven.plugins.release.PrepareReleaseMojo.execute (PrepareReleaseMojo.java:240)
      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:956)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:566)
      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.ClassNotFoundException: org.apache.maven.scm.command.untag.UntagScmResult
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:50)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
      at java.lang.Class.getDeclaredMethods0 (Native Method)
      at java.lang.Class.privateGetDeclaredMethods (Class.java:3167)
      at java.lang.Class.getDeclaredMethods (Class.java:2310)
      at com.google.inject.spi.InjectionPoint.getDeclaredMethods (InjectionPoint.java:766)
      at com.google.inject.spi.InjectionPoint.getInjectionPoints (InjectionPoint.java:683)
      at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields (InjectionPoint.java:378)
      at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies (ConstructorBindingImpl.java:182)
      at com.google.inject.internal.InjectorImpl.getInternalDependencies (InjectorImpl.java:661)
      at com.google.inject.internal.InjectorImpl.cleanup (InjectorImpl.java:617)
      at com.google.inject.internal.InjectorImpl.initializeJitBinding (InjectorImpl.java:603)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBinding (InjectorImpl.java:932)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive (InjectorImpl.java:852)
      at com.google.inject.internal.InjectorImpl.getJustInTimeBinding (InjectorImpl.java:291)
      at com.google.inject.internal.InjectorImpl.getBindingOrThrow (InjectorImpl.java:222)
      at com.google.inject.internal.InjectorImpl.getProviderOrThrow (InjectorImpl.java:1040)
      at com.google.inject.internal.InjectorImpl.getProvider (InjectorImpl.java:1071)
      at com.google.inject.internal.InjectorImpl.getProvider (InjectorImpl.java:1034)
      at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
      at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
      at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
      at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
      at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
      at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
      at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision (BeanScheduler.java:230)
      at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:120)
      at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
      at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
      at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
      at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40)
      at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:168)
      at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:39)
      at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
      at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
      at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
      at org.apache.maven.scm.manager.AbstractScmManager.getProviderByType (AbstractScmManager.java:144)
      at org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository (AbstractScmManager.java:202)
      at org.apache.maven.shared.release.scm.DefaultScmRepositoryConfigurator.getConfiguredRepository (DefaultScmRepositoryConfigurator.java:78)
      at org.apache.maven.shared.release.scm.DefaultScmRepositoryConfigurator.getConfiguredRepository (DefaultScmRepositoryConfigurator.java:67)
      at org.apache.maven.shared.release.phase.CheckPomPhase.execute (CheckPomPhase.java:92)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:234)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:169)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:146)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:107)
      at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease (PrepareReleaseMojo.java:286)
      at org.apache.maven.plugins.release.PrepareReleaseMojo.execute (PrepareReleaseMojo.java:240)
      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:956)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:566)
      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)
  </code></pre>
  
  <p>So my question is how to fix that?</p>