maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek (JIRA)" <>
Subject [jira] (MRELEASE-875) release:prepare does not commit pom.xml if not in the git root
Date Fri, 27 Jun 2014 02:05:10 GMT


Alexander Klimetschek commented on MRELEASE-875:

h3. Issue with untracked files in git status --porcelain output

One problem (but not the only one) is in those lines:

[WARNING] Ignoring unrecognized line: ?? bundles/s7imaging/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? bundles/s7imaging/

These prevent the {{git commit}} from happening - WARNING here is an understatement, it should
be ERROR since the execution is aborted and with no commit the following steps won't work

The issue is that apparently in some git version the output of {{git status --porcelain}}
changed to show untracked files using the {{??}} markers, and this will hit the 2 files that
the maven release always creates, {{pom.xml.releaseBackup}} {{}}.

>From what I can see the problem was actually just recently introduced by SCM-709 (scm
1.9, maven-release-plugin 2.5 afaik) and commit [fa5b0dd8|;a=blobdiff;f=maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/status/;h=11c541a169d32c388547f3e73b25c935ee198db8;hp=d9cc75a9b5c4b8421465d29e48ffa4bc51dd3c7f;hb=fa5b0dd8f01da05f2e67be412bff231a620c295c;hpb=c96ca2477eb0c8227631784417173afa7805a410]
which made it fail on unknown lines (such as ??) instead of ignoring it as before.

So one can fix that by telling git to not output any untracked files (??) by setting the git
config {{status.showUntrackedFiles = no}}.

**However**, after doing so, those WARNING lines are gone (good), but still the {{git commit}}
doesn't happen (bad). Something else must make the scm plugin think there is no change to
the pom.xml and not execute the commit (did not dig deeper).

h3. Workaround so far

What worked for me at some point was this combination:

* release plugin 2.3.2: {{mvn maven-release-plugin:2.3.2:prepare}} (did not try other versions)
* git config: {{status.displayCommentPrefix = true}} and {{status.showUntrackedFiles = no}}
(maybe optional)

> release:prepare does not commit pom.xml if not in the git root
> --------------------------------------------------------------
>                 Key: MRELEASE-875
>                 URL:
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.5
>         Environment: git 1.9.0
>            Reporter: john ten Den
> When the project pom.xml is not in the Git project root (f.e. in the "src" directory)
the pom.xml not committed and pushed (before tagging)
> Commit of the pom.xml during release:prepare works fine if it is in the / (root) of the
git repository
> Using the pom.xml in a subdirectory worked well with version 2.4.2 using git 1.7. 

This message was sent by Atlassian JIRA

View raw message