title: Error during prepare to release phase using Maven Relelase Plugin
body: <p>I'am new in Maven and trying to perform release using maven-release-plugin.
  After running mvn release:prepare i receive following info in console:</p>
  
  <blockquote>
    <p>[INFO] Scanning for projects... [INFO]<br>
    [INFO]
    ------------------------------------------------------------------------ [INFO] Building Feeder 1.0.3-SNAPSHOT [INFO]
    ------------------------------------------------------------------------ [INFO]  [INFO] --- maven-release-plugin:2.5.2:prepare (default-cli) @
    Feeder --- [INFO] Resuming release from phase 'run-preparation-goals'
    [INFO] Executing goals 'clean install'... [WARNING] Error injecting:
    org.apache.maven.shared.release.exec.InvokerMavenExecutor
    java.lang.NoClassDefFoundError: Lorg/apache/commons/cli/Options;  at
    java.lang.Class.getDeclaredFields0(Native Method)     at
    java.lang.Class.privateGetDeclaredFields(Class.java:2583)     at
    java.lang.Class.getDeclaredFields(Class.java:1916)    at
    com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:661)
      at
    com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:366)
      at
    com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)
      at
    com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:609)
      at
    com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:565)
      at
    com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:551)
      at
    com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:865)
      at
    com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:790)
      at
    com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:278)
      at
    com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:210)
      at
    com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:986)
      at
    com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1019)
      at
    com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:982)
      at
    com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
      at
    org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
      at
    com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
      at
    com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
      at
    com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
      at
    com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
      at
    org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)
      at
    com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
      at
    com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
      at
    com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
      at
    com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
      at
    com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      at
    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1054)
      at
    com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      at com.google.inject.Scopes$1$1.get(Scopes.java:59)     at
    com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      at
    com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
      at
    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
      at
    com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
      at
    org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
      at
    org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
      at java.util.AbstractMap.get(AbstractMap.java:187)  at
    org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:74)
      at
    org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.execute(RunPrepareGoalsPhase.java:44)
      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:132)
      at
    org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      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:116)
      at
    org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at
    org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at
    org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)   at
    org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)  at
    org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)  at
    org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)   at
    org.apache.maven.cli.MavenCli.main(MavenCli.java:158)     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:497)     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)
    Caused by: java.lang.ClassNotFoundException:
    org.apache.commons.cli.Options    at
    org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      at
    org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
      at
    org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
      at
    org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
      ... 67 more [INFO]
    ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
    ------------------------------------------------------------------------ [INFO] Total time: 1.578 s [INFO] Finished at:
    2015-04-30T12:17:24+03:00 [INFO] Final Memory: 9M/155M [INFO]
    ------------------------------------------------------------------------ [ERROR] Failed to execute goal
    org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare
    (default-cli) on project Feeder: Execution default-cli of goal
    org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare failed: A
    required class was missing while executing
    org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare:
    Lorg/apache/commons/cli/Options; [ERROR]
    ----------------------------------------------------- [ERROR] realm =    plugin>org.apache.maven.plugins:maven-release-plugin:2.5.2 [ERROR]
    strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    [ERROR] urls[0] =
    file:/C:/Users/Maya/.m2/repository/org/apache/maven/plugins/maven-release-plugin/2.5.2/maven-release-plugin-2.5.2.jar
    [ERROR] urls[1] =
    file:/C:/Users/Maya/.m2/repository/org/apache/maven/release/maven-release-manager/2.5.2/maven-release-manager-2.5.2.jar
    [ERROR] urls[2] =
    file:/C:/Users/Maya/.m2/repository/org/apache/maven/release/maven-release-api/2.5.2/maven-release-api-2.5.2.jar
    [ERROR] urls[3] =
    file:/C:/Users/Maya/.m2/repository/org/eclipse/aether/aether-util/1.0.0.v20140518/aether-util-1.0.0.v20140518.jar
    [ERROR] urls[4] =
    file:/C:/Users/Maya/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
    [ERROR] urls[5] =
    file:/C:/Users/Maya/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-6/plexus-interactivity-api-1.0-alpha-6.jar
    [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import 
    from realm ClassRealm[maven.api, parent: null]] [ERROR]  [ERROR]
    -----------------------------------------------------: org.apache.commons.cli.Options [ERROR] -> [Help 1] [ERROR]  [ERROR] To
    see the full stack trace of the errors, re-run Maven with the -e
    switch. [ERROR] Re-run Maven using the -X switch to enable full debug
    logging. [ERROR]  [ERROR] For more information about the errors and
    possible solutions, please read the following articles: [ERROR] [Help
    1]
    <a href="http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException" rel="nofollow">http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException</a></p>
  </blockquote>
  
  <p>My POM file look like:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;com.mayacomp&lt;/groupId&gt;
    &lt;artifactId&gt;feeder&lt;/artifactId&gt;
    &lt;version&gt;1.0.3-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
  
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  
    &lt;scm&gt;
     &lt;developerConnection&gt;scm:svn:http://svn01/svn/DEV/Maya/Code/feeder/tag/feeder-1.0.3&lt;/developerConnection&gt;
     &lt;url&gt;scm:svn:http://svn01/svn/DEV/Maya/Code/feeder/tag/feeder-1.0.3&lt;/url&gt;
   &lt;/scm&gt;
  
    &lt;properties&gt;
  
      &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;jdk.version&gt;1.8&lt;/jdk.version&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
     &lt;dependency&gt;
        &lt;groupId&gt;log4j&lt;/groupId&gt;
        &lt;artifactId&gt;log4j&lt;/artifactId&gt;
        &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  &lt;dependency&gt;
      &lt;groupId&gt;net.sf.opencsv&lt;/groupId&gt;
      &lt;artifactId&gt;opencsv&lt;/artifactId&gt;
      &lt;version&gt;2.3&lt;/version&gt;
  &lt;/dependency&gt;
  
  
   &lt;dependency&gt;
      &lt;groupId&gt;org.apache.maven.shared&lt;/groupId&gt;
      &lt;artifactId&gt;maven-shared-utils&lt;/artifactId&gt;
      &lt;version&gt;0.7&lt;/version&gt;
  &lt;/dependency&gt;
  
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
      &lt;artifactId&gt;maven-archiver&lt;/artifactId&gt;
      &lt;version&gt;2.6&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.5.3&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.maven.shared&lt;/groupId&gt;
      &lt;artifactId&gt;maven-common-artifact-filters&lt;/artifactId&gt;
      &lt;version&gt;1.4&lt;/version&gt;
  &lt;/dependency&gt;
  
    &lt;dependency&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.2&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
  
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.3&lt;/version&gt;
          &lt;configuration&gt;
              &lt;source&gt;${jdk.version}&lt;/source&gt;
              &lt;target&gt;${jdk.version}&lt;/target&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
  
        &lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.6&lt;/version&gt;
            &lt;configuration&gt;
              &lt;archive&gt;
                  &lt;manifest&gt;
                      &lt;mainClass&gt;com.mayacomp.feeder.App&lt;/mainClass&gt;
                  &lt;/manifest&gt;
              &lt;/archive&gt;
            &lt;/configuration&gt;
        &lt;/plugin&gt;
  
  
  
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;archive&gt;
            &lt;manifest&gt;
              &lt;mainClass&gt;com.mayacomp.feeder.App&lt;/mainClass&gt;
            &lt;/manifest&gt;
          &lt;/archive&gt;
          &lt;descriptorRefs&gt;
            &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
          &lt;/descriptorRefs&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
  
       &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.2&lt;/version&gt;
          &lt;configuration&gt;
                      &lt;tagBase&gt;http://svn01/svn/DEV/Maya/Code/feeder/tag&lt;/tagBase&gt;
                      &lt;branchBase&gt;http://svn01/svn/DEV/Maya/Code/feeder/branches&lt;/branchBase&gt;
                      &lt;preparationGoals&gt;clean install&lt;/preparationGoals&gt;
                      &lt;goal&gt;deploy&lt;/goal&gt;
                     &lt;autoVersionSubmodules&gt;true&lt;/autoVersionSubmodules&gt;
            &lt;/configuration&gt;
       &lt;/plugin&gt;
  
  
      &lt;/plugins&gt;
    &lt;/build&gt;
  
  
  &lt;distributionManagement&gt;
   &lt;repository&gt;
      &lt;id&gt;com-mayacomp-retail-release&lt;/id&gt;
      &lt;url&gt;http://192.168.0.17::8080/nexus-webapp-2.11.0-02/content/repositories/com-mayacomp-retail-release&lt;/url&gt;
    &lt;/repository&gt;
     &lt;snapshotRepository&gt;
      &lt;id&gt;com-mayacomp-retail-snapshot&lt;/id&gt;
      &lt;url&gt;http://192.168.0.17::8080/nexus-webapp-2.11.0-02/content/repositories/com-mayacomp-retail-snapshot&lt;/url&gt;
    &lt;/snapshotRepository&gt;
   &lt;/distributionManagement&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <h2>UPDATE 1:</h2>
  
  <p>Fixed scm element in pom:</p>
  
  <pre><code>&lt;scm&gt; &lt;developerConnection&gt;scm:svn:http://svn01/svn/DEV/Maya/Code/Feeder/trunk&lt;/developerConnection&gt;
  &lt;url&gt;scm:svn:http://svn01/svn/DEV/Maya/Code/Feeder/trunk&lt;/url&gt;
  &lt;/scm&gt;
  </code></pre>