Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-633

release:prepare on CVS flat multi-module project breaks at tagging

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.1, 2.2
    • None
    • prepare
    • None
    • - Maven 3.0.1
      - Tested with relase-plugin 2.1 and 2.2-SNAPSHOT

    Description

      When running "mvn release:prepare -DcommitByProject=true" on a simple flat multi-module (parent and module are in the same directory) project the goal does exit with:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project test-main: The scm url is invalid.
      [ERROR] - The connection string contains too few tokens.
      [ERROR] -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project test-main: The scm url is invalid.
        - The connection string contains too few tokens.
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.MojoFailureException: The scm url is invalid.
        - The connection string contains too few tokens.
              at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:287)
              at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:237)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
              ... 19 more
      Caused by: org.apache.maven.shared.release.scm.ReleaseScmRepositoryException: The scm url is invalid.
        - The connection string contains too few tokens.
              at org.apache.maven.shared.release.phase.ScmTagPhase.execute(ScmTagPhase.java:87)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:203)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:140)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:103)
              at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:279)
              ... 22 more
      

      However, the cvs commits earlier do work fine :

      [INFO] Checking in modified POMs...
      [INFO] Executing: cmd.exe /X /C "cvs -z3 -f -q commit -R -F C:\Users\mglauche\AppData\Local\Temp\scm-commit-message1543133116513199803.txt pom.xml"
      [INFO] Working directory: C:\work\workspaces\maven\test-main
      ...
      

      test-main pom.xml:

       <scm>
        <connection>scm:cvs:pserver:${maven.scm.username}@cvsserver:/home/cvs/repository/test:test-main</connection>
        </scm>
         <modules>
        	<module>../module1</module>
        </modules>
      

      module1 pom.xml:

        <parent>
          <artifactId>test-main</artifactId>
          <groupId>somegroup</groupId>
          <version>0.0.2-SNAPSHOT</version>
          <relativePath>../test-main</relativePath>
        </parent>
        <groupId>somegroup</groupId>
        <artifactId>module1</artifactId>
        <version>0.0.2-SNAPSHOT</version>
         <scm>
          <connection>scm:cvs:pserver:${maven.scm.username}@cvsserver:/home/cvs/repository/test:module1</connection>
         </scm>
      

      ${maven.scm.username} is set to the correct user with a settings.xml parameter.

      The interesting thing is, the SCM provider does think the pom is valid:

      $ mvn scm:validate
      [INFO] --- maven-scm-plugin:1.4:validate (default-cli) @ test-main ---
      [INFO] connectionUrl scm connection string is valid.
      [INFO] project.scm.connection scm connection string is valid.
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mglauche Michael Glauche
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: