[ 
https://issues.apache.org/jira/browse/MRELEASE-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15860199#comment-15860199
 ] 

Nicolas Poisson edited comment on MRELEASE-967 at 2/9/17 9:04 PM:
------------------------------------------------------------------

We have the same problem at our company. The behavior is slightly different 
depending on the build environment, but the underlying cause is the same. 

When building locally through the command line, it fails when trying to push 
the tag to git (see mrp-git-local.txt for fuller log). 

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on 
project mrp-test: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] remote: [Syntax check] There should be at least one change-set with a 
valid issue key
[ERROR] To https://mygit/scm/mykey/maven-release-plugin-test.git
[ERROR] ! [remote rejected] mrp-test-1.0.9 -> mrp-test-1.0.9 (pre-receive hook 
declined)
[ERROR] error: failed to push some refs to 
'https://mygit/scm/mykey/maven-release-plugin-test.git'


When building on Jenkins through the M2Release plugin, it fails at the previous 
step (pushing changes to branch) but with a similar error message (see 
mrp-git-jenkins.txt for fuller log).

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on 
project mrp-test: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] remote: [Syntax check] change-sets without a valid issue-key are not 
allowed ([95dc4d5379a1])
[ERROR] To https://myuser:********@mygit/scm/mykey/maven-release-plugin-test.git
[ERROR] ! [remote rejected] master -> master (pre-receive hook declined)
[ERROR] error: failed to push some refs to 
'https://myuser:********@mygit/scm/mykey/maven-release-plugin-test.git'

If the hook is deactivated, the JIRA issue provided in the commit comment is 
tied correctly to the push, so it looks like this information is simply not 
given to the push operation in a timely manner. You can see in the attached 
logs that the -m flag is not given to either operation by the plugin.



was (Author: poin027):
We have the same problem at our company. The behavior is slightly different 
depending on the build environment, but the underlying cause is the same. 

When building locally through the command line, it fails when trying to push 
the tag to git. 

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on 
project mrp-test: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] remote: [Syntax check] There should be at least one change-set with a 
valid issue key
[ERROR] To https://mygit/scm/mykey/maven-release-plugin-test.git
[ERROR] ! [remote rejected] mrp-test-1.0.9 -> mrp-test-1.0.9 (pre-receive hook 
declined)
[ERROR] error: failed to push some refs to 
'https://mygit/scm/mykey/maven-release-plugin-test.git'


When building on Jenkins through the M2Release plugin, it fails at the previous 
step (pushing changes to branch) but with a similar error message.

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on 
project mrp-test: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] remote: [Syntax check] change-sets without a valid issue-key are not 
allowed ([95dc4d5379a1])
[ERROR] To https://myuser:********@mygit/scm/mykey/maven-release-plugin-test.git
[ERROR] ! [remote rejected] master -> master (pre-receive hook declined)
[ERROR] error: failed to push some refs to 
'https://myuser:********@mygit/scm/mykey/maven-release-plugin-test.git'

If the hook is deactivated, the JIRA issue provided in the commit comment is 
tied correctly to the push, so it looks like this information is simply not 
given to the push operation in a timely manner. You can see in the attached 
logs that the -m flag is not given to either operation by the plugin.


> scmCommentPrefix is not used when tagging
> -----------------------------------------
>
>                 Key: MRELEASE-967
>                 URL: https://issues.apache.org/jira/browse/MRELEASE-967
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.5.3
>         Environment: Linux, Maven 3.3.9, jdk 1.0.8_102, GIT
>            Reporter: Claus Nielsen
>         Attachments: mrp-git-jenkins.txt, mrp-git-local.txt
>
>
> We use a Jira Hook in out GIT installation to ensure a Jira Ticket in all 
> commits. This is of course also activated when the release plugin comes into 
> play.
> When using release prepare with the scmCommentPrefix parameter, the commit 
> message is not as expected when it comes to tagging. The initial prepare 
> commit where the release version is committed works fine with the 
> scmCommentPrefix, but in the next phase where the actual tagging is made the 
> value in scmCommentPrefix is ignored. This result in a failing release with a 
> lot of manual cleaning up in poms... :-(
> I can see that there was a problem with this earlier before using scm api 1.3 
> and before the maven release version 2.0. But this should be fixed now.
> Here is an example:
> mvn release:prepare release:perform '-DscmCommentPrefix=NIS-145 NIS-295 
> (clausfod)' -Dresume=false '-Darguments=-DskipTests'



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to