Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14781

Maven Release Plugin performs build without goals

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • m2release-plugin
    • None

      Steps:

      1. Perform maven release plugin
      2. Specify SCM Credentials with " in password
      3. Schedule maven release

      Results:
      In logs I see:

      Executing Maven:  -B -f c:\opt\Jenkins\jobs\project-ci\workspace\pom.xml -DdevelopmentVersion=4.4.005-SNAPSHOT -DreleaseVersion=4.4.004 -Dusername=user -Dpassword=*********
      ....
      No goals have been specified for this build. You must specify a valid lifecycle phase or a goal

      Build fails.

      Expected results:
      Release goals are passed in maven during release.

          [JENKINS-14781] Maven Release Plugin performs build without goals

          jsirex created issue -

          jsirex added a comment - - edited

          Looks like this issue is releated to SCM Password.
          When I perform release build, check "Provide SCM User and Password" and enter an password with " symbol plugin fails.

          Also, it will be good point to use Jenkins' stored SCM Login/Password, because if I just press release without specifying SCM credentials it fails with "Authentication Failure".

          jsirex added a comment - - edited Looks like this issue is releated to SCM Password. When I perform release build, check "Provide SCM User and Password" and enter an password with " symbol plugin fails. Also, it will be good point to use Jenkins' stored SCM Login/Password, because if I just press release without specifying SCM credentials it fails with "Authentication Failure".

          James Nord added a comment -

          just to confirm
          when you say it works on Linux with Iceweasel - is it still talking to the jenkins master running on windows and are you still using a password with a " symbol in it?

          James Nord added a comment - just to confirm when you say it works on Linux with Iceweasel - is it still talking to the jenkins master running on windows and are you still using a password with a " symbol in it?

          jsirex added a comment -

          I've recently figured out why it fails. Checked on Linux - failed to.
          Sorry, my fault. I'll update issue description.

          jsirex added a comment - I've recently figured out why it fails. Checked on Linux - failed to. Sorry, my fault. I'll update issue description.
          jsirex made changes -
          Description Original: I have jenkins master installed on Windows. Browser is chrome (sometimes reproduced in firefox too).
          Steps:
          # Perform maven release plugin
          # Specify SCM Credentials (mvn release fails without it)
          # Schedule maven release

          Results:
          In logs I see:
          {code}Executing Maven: -B -f c:\opt\Jenkins\jobs\project-ci\workspace\pom.xml -DdevelopmentVersion=4.4.005-SNAPSHOT -DreleaseVersion=4.4.004 -Dusername=user -Dpassword=*********
          ....
          No goals have been specified for this build. You must specify a valid lifecycle phase or a goal{code}
          Build fails.

          Expected results:
          Release goals are passed in maven during release.

          Note: On Linux with Icewasel (firefox) 10.0.6 all works fine.

          It's very strange odd for me.


          New: Steps:
          # Perform maven release plugin
          # Specify SCM Credentials with " in password
          # Schedule maven release

          Results:
          In logs I see:
          {code}Executing Maven: -B -f c:\opt\Jenkins\jobs\project-ci\workspace\pom.xml -DdevelopmentVersion=4.4.005-SNAPSHOT -DreleaseVersion=4.4.004 -Dusername=user -Dpassword=*********
          ....
          No goals have been specified for this build. You must specify a valid lifecycle phase or a goal{code}
          Build fails.

          Expected results:
          Release goals are passed in maven during release.

          Michael Rumpf added a comment -

          I have another example under Windows:

          USER: USERNAME
          PWD: abc&xyz

          When I specify the SCM logon credentials the Maven Release Plugin executions fails with the following error:

          10:38:41 [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-release-plugin:2.0:prepare' with basic configurator -->
          10:38:41 [DEBUG]   (f) addSchema = true
          10:38:41 [DEBUG]   (f) allowReleasePluginSnapshot = false
          10:38:41 [DEBUG]   (f) allowTimestampedSnapshots = false
          10:38:41 [DEBUG]   (f) autoVersionSubmodules = false
          10:38:41 [DEBUG]   (s) basedir = D:\export\build\jenkins-slave-sbs2\workspace\project-trunk
          10:38:41 [DEBUG]   (f) commitByProject = false
          10:38:41 [DEBUG]   (f) developmentVersion = 1.2.3.4-SNAPSHOT
          10:38:41 [DEBUG]   (f) dryRun = true
          10:38:41 [DEBUG]   (f) generateReleasePoms = false
          10:38:41 [DEBUG]   (f) javaHome = D:\export\build\jenkins-slave-sbs2\tools\hudson.model.JDK\JDK1.7.0_latest_\jre
          10:38:41 [DEBUG]   (f) localCheckout = false
          10:38:41 [DEBUG]   (f) mavenExecutorId = invoker
          10:38:41 [DEBUG]   (f) mavenHome = D:\export\build\jenkins-slave-sbs2\tools\hudson.tasks.Maven_MavenInstallation\maven-3.0.4
          10:38:41 [DEBUG]   (f) password = abc&xyz
          10:38:41 [DEBUG]   (f) preparationGoals = clean verify
          10:38:41 [DEBUG]   (f) project = MavenProject: com.company.group:artifact:1.2.3.4-SNAPSHOT @ D:\export\build\jenkins-slave-sbs2\workspace\project-trunk\pom.xml
          10:38:41 [DEBUG]   (f) reactorProjects = [MavenProject: com.company.group:artifact:1.2.3.4-SNAPSHOT @ D:\export\build\jenkins-slave-sbs2\workspace\project-trunk\pom.xml]
          10:38:41 [DEBUG]   (f) releaseVersion = 1.2.3.4
          10:38:41 [DEBUG]   (f) remoteTagging = true
          10:38:41 [DEBUG]   (f) resume = false
          10:38:41 [DEBUG]   (f) scmCommentPrefix = [maven-release-plugin] 
          10:38:41 [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@2b5fab
          10:38:41 [DEBUG]   (f) settings = org.apache.maven.execution.SettingsAdapter@1bc0e73
          10:38:41 [DEBUG]   (f) updateDependencies = true
          10:38:41 [DEBUG]   (f) useEditMode = false
          10:38:41 [DEBUG]   (f) username = USERNAME
          10:38:41 [DEBUG] -- end configuration --
          10:38:41 [INFO] Verifying that there are no local modifications...
          10:38:41 [INFO] Executing: cmd.exe /X /C "svn --username USERNAME --password ***** --non-interactive status"
          10:38:41 [INFO] Working directory: D:\export\build\jenkins-slave-sbs2\workspace\project-trunk
          10:38:50 [INFO] ------------------------------------------------------------------------
          10:38:50 [INFO] BUILD FAILURE
          10:38:50 [INFO] ------------------------------------------------------------------------
          10:38:50 [INFO] Total time: 10.936s
          10:38:50 [INFO] Finished at: Fri Oct 04 10:38:50 CEST 2013
          10:38:50 [INFO] Final Memory: 7M/19M
          10:38:50 [INFO] ------------------------------------------------------------------------
          10:38:51 [JENKINS] Archiving disabled
          10:38:52 Waiting for Jenkins to finish collecting data
          10:38:52 mavenExecutionResult exceptions not empty
          10:38:52 message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project artifact: Unable to check for local modifications
          10:38:52 Provider message:
          10:38:52 The svn command failed.
          10:38:52 Command output:
          10:38:52 Subcommand argument required
          10:38:52 Type 'svn help' for usage.
          10:38:52 'xyz' is not recognized as an internal or external command,
          10:38:52 operable program or batch file.
          10:38:52 
          10:38:52 cause : Unable to check for local modifications
          10:38:52 Provider message:
          10:38:52 The svn command failed.
          10:38:52 Command output:
          10:38:52 Subcommand argument required
          10:38:52 Type 'svn help' for usage.
          10:38:52 'xyz' is not recognized as an internal or external command,
          10:38:52 operable program or batch file.
          10:38:52 
          10:38:52 Stack trace : 
          10:38:52 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project artifact: Unable to check for local modifications
          

          The workaround is to ask users to remove shell special characters from their passwords.

          Michael Rumpf added a comment - I have another example under Windows: USER: USERNAME PWD: abc&xyz When I specify the SCM logon credentials the Maven Release Plugin executions fails with the following error: 10:38:41 [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-release-plugin:2.0:prepare' with basic configurator --> 10:38:41 [DEBUG] (f) addSchema = true 10:38:41 [DEBUG] (f) allowReleasePluginSnapshot = false 10:38:41 [DEBUG] (f) allowTimestampedSnapshots = false 10:38:41 [DEBUG] (f) autoVersionSubmodules = false 10:38:41 [DEBUG] (s) basedir = D:\export\build\jenkins-slave-sbs2\workspace\project-trunk 10:38:41 [DEBUG] (f) commitByProject = false 10:38:41 [DEBUG] (f) developmentVersion = 1.2.3.4-SNAPSHOT 10:38:41 [DEBUG] (f) dryRun = true 10:38:41 [DEBUG] (f) generateReleasePoms = false 10:38:41 [DEBUG] (f) javaHome = D:\export\build\jenkins-slave-sbs2\tools\hudson.model.JDK\JDK1.7.0_latest_\jre 10:38:41 [DEBUG] (f) localCheckout = false 10:38:41 [DEBUG] (f) mavenExecutorId = invoker 10:38:41 [DEBUG] (f) mavenHome = D:\export\build\jenkins-slave-sbs2\tools\hudson.tasks.Maven_MavenInstallation\maven-3.0.4 10:38:41 [DEBUG] (f) password = abc&xyz 10:38:41 [DEBUG] (f) preparationGoals = clean verify 10:38:41 [DEBUG] (f) project = MavenProject: com.company.group:artifact:1.2.3.4-SNAPSHOT @ D:\export\build\jenkins-slave-sbs2\workspace\project-trunk\pom.xml 10:38:41 [DEBUG] (f) reactorProjects = [MavenProject: com.company.group:artifact:1.2.3.4-SNAPSHOT @ D:\export\build\jenkins-slave-sbs2\workspace\project-trunk\pom.xml] 10:38:41 [DEBUG] (f) releaseVersion = 1.2.3.4 10:38:41 [DEBUG] (f) remoteTagging = true 10:38:41 [DEBUG] (f) resume = false 10:38:41 [DEBUG] (f) scmCommentPrefix = [maven-release-plugin] 10:38:41 [DEBUG] (f) session = org.apache.maven.execution.MavenSession@2b5fab 10:38:41 [DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter@1bc0e73 10:38:41 [DEBUG] (f) updateDependencies = true 10:38:41 [DEBUG] (f) useEditMode = false 10:38:41 [DEBUG] (f) username = USERNAME 10:38:41 [DEBUG] -- end configuration -- 10:38:41 [INFO] Verifying that there are no local modifications... 10:38:41 [INFO] Executing: cmd.exe /X /C "svn --username USERNAME --password ***** --non-interactive status" 10:38:41 [INFO] Working directory: D:\export\build\jenkins-slave-sbs2\workspace\project-trunk 10:38:50 [INFO] ------------------------------------------------------------------------ 10:38:50 [INFO] BUILD FAILURE 10:38:50 [INFO] ------------------------------------------------------------------------ 10:38:50 [INFO] Total time: 10.936s 10:38:50 [INFO] Finished at: Fri Oct 04 10:38:50 CEST 2013 10:38:50 [INFO] Final Memory: 7M/19M 10:38:50 [INFO] ------------------------------------------------------------------------ 10:38:51 [JENKINS] Archiving disabled 10:38:52 Waiting for Jenkins to finish collecting data 10:38:52 mavenExecutionResult exceptions not empty 10:38:52 message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare ( default -cli) on project artifact: Unable to check for local modifications 10:38:52 Provider message: 10:38:52 The svn command failed. 10:38:52 Command output: 10:38:52 Subcommand argument required 10:38:52 Type 'svn help' for usage. 10:38:52 'xyz' is not recognized as an internal or external command, 10:38:52 operable program or batch file. 10:38:52 10:38:52 cause : Unable to check for local modifications 10:38:52 Provider message: 10:38:52 The svn command failed. 10:38:52 Command output: 10:38:52 Subcommand argument required 10:38:52 Type 'svn help' for usage. 10:38:52 'xyz' is not recognized as an internal or external command, 10:38:52 operable program or batch file. 10:38:52 10:38:52 Stack trace : 10:38:52 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare ( default -cli) on project artifact: Unable to check for local modifications The workaround is to ask users to remove shell special characters from their passwords.
          Michael Rumpf made changes -
          Link New: This issue is duplicated by JENKINS-17233 [ JENKINS-17233 ]

          Michael Rumpf added a comment -

          There are also issues with "#" as a first character of the password:
          https://kthoms.wordpress.com/tag/subversion/

          In general the password needs to be escaped (quotes) and there are multiple parties involved:

          • Jenkins asks for the password
          • Jenkins invokes the Maven release plugin with parameter -Dpassword=******
          • The Maven release plugin invokes the Subversion client tool --password=*****

          Michael Rumpf added a comment - There are also issues with "#" as a first character of the password: https://kthoms.wordpress.com/tag/subversion/ In general the password needs to be escaped (quotes) and there are multiple parties involved: Jenkins asks for the password Jenkins invokes the Maven release plugin with parameter -Dpassword=****** The Maven release plugin invokes the Subversion client tool --password=*****

          Mircea D added a comment -

          It's the same thing for the ^ (batch escape character).

          Mircea D added a comment - It's the same thing for the ^ (batch escape character).

          Michael Rumpf added a comment -

          Also the '$' causes trouble.

          Michael Rumpf added a comment - Also the '$' causes trouble.

            Unassigned Unassigned
            jsirex jsirex
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: