[
https://issues.apache.org/jira/browse/SCM-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963991#comment-17963991
]
ASF GitHub Bot commented on SCM-1022:
-------------------------------------
jira-importer opened a new issue, #1244:
URL: https://github.com/apache/maven-scm/issues/1244
**[Mattias
Andersson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=attiand)**
opened
**[SCM-1022](https://issues.apache.org/jira/browse/SCM-1022?redirect=false)**
and commented
If the push command fails, the maven build does not fail. This means
binaries are deployed, but the remote repo is not updated. The issue seems
related to SCM-854.
We use Gerrit and have the merge strategy set to "fast forward only". If
someone pushes a commit during the release job, only an INFO message is logged,
but the maven build is successful.
The same use case with the maven-scm-provider-gitexe (the default) fails the
build as expected (git push returns a non-zero exit code)
```java
10:28:03 [INFO] commit done: [maven-release-plugin] prepare release 2.15.0
10:28:03 [INFO] push changes to remote...
refs/heads/master:refs/heads/master
10:28:03 [INFO] fetch url: ssh://xxx@xxx
10:28:03 [INFO] push url: ssh://xxx@xxx
10:28:03 [INFO] getOrCreateProvider(EdDSA) created instance of
net.i2p.crypto.eddsa.EdDSASecurityProvider
10:28:03 [INFO] No detected/configured IoServiceFactoryFactory using
Nio2ServiceFactoryFactory
10:28:04 [INFO] REJECTED_NONFASTFORWARD -
RemoteRefUpdate[remoteName=refs/heads/master, REJECTED_NONFASTFORWARD,
1eee06203068576ddcaae4eefe0ea15a52fb49ba...3102c82c6b62d4e86c75194569c2574ac722b6dd,
srcRef=refs/heads/master, message=null]
10:28:04 [INFO] 12/17 prepare:scm-tag
10:28:04 [INFO] Tagging release with the label 2.15.0...
10:28:04 [INFO] push tag [2.15.0] to remote...
10:28:04 [INFO] fetch url: ssh://xxx@xxx
10:28:04 [INFO] push url: ssh://xxx@xxx
10:28:05 [INFO] OK - RemoteRefUpdate[remoteName=refs/tags/2.15.0, OK,
0000000000000000000000000000000000000000...968d97de8331ce19d43c719e870890def5ee65d9,
fastForward, srcRef=refs/tags/2.15.0, message=null]
```
---
**Affects:** 2.0.1
**Remote Links:**
- [GitHub Pull Request #203
](https://github.com/apache/maven-scm/pull/203)
> jgit push failure is not failing the build
> ------------------------------------------
>
> Key: SCM-1022
> URL: https://issues.apache.org/jira/browse/SCM-1022
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-provider-jgit
> Affects Versions: 2.0.1
> Reporter: Mattias Andersson
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 2.1.0
>
>
> If the push command fails, the maven build does not fail. This means binaries
> are deployed, but the remote repo is not updated. The issue seems related to
> SCM-854.
> We use Gerrit and have the merge strategy set to "fast forward only". If
> someone pushes a commit during the release job, only an INFO message is
> logged, but the maven build is successful.
> The same use case with the maven-scm-provider-gitexe (the default) fails the
> build as expected (git push returns a non-zero exit code)
> {code:java}
> 10:28:03 [INFO] commit done: [maven-release-plugin] prepare release 2.15.0
> 10:28:03 [INFO] push changes to remote... refs/heads/master:refs/heads/master
> 10:28:03 [INFO] fetch url: ssh://xxx@xxx
> 10:28:03 [INFO] push url: ssh://xxx@xxx
> 10:28:03 [INFO] getOrCreateProvider(EdDSA) created instance of
> net.i2p.crypto.eddsa.EdDSASecurityProvider
> 10:28:03 [INFO] No detected/configured IoServiceFactoryFactory using
> Nio2ServiceFactoryFactory
> 10:28:04 [INFO] REJECTED_NONFASTFORWARD -
> RemoteRefUpdate[remoteName=refs/heads/master, REJECTED_NONFASTFORWARD,
> 1eee06203068576ddcaae4eefe0ea15a52fb49ba...3102c82c6b62d4e86c75194569c2574ac722b6dd,
> srcRef=refs/heads/master, message=null]
> 10:28:04 [INFO] 12/17 prepare:scm-tag
> 10:28:04 [INFO] Tagging release with the label 2.15.0...
> 10:28:04 [INFO] push tag [2.15.0] to remote...
> 10:28:04 [INFO] fetch url: ssh://xxx@xxx
> 10:28:04 [INFO] push url: ssh://xxx@xxx
> 10:28:05 [INFO] OK - RemoteRefUpdate[remoteName=refs/tags/2.15.0, OK,
> 0000000000000000000000000000000000000000...968d97de8331ce19d43c719e870890def5ee65d9,
> fastForward, srcRef=refs/tags/2.15.0, message=null]{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)