[ https://jira.codehaus.org/browse/MRELEASE-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=348845#comment-348845 ]
Alexander Klimetschek edited comment on MRELEASE-875 at 6/26/14 9:29 PM: ------------------------------------------------------------------------- h3. Issue with untracked files in git status --porcelain output One problem (but not the only one) is in those lines: {code} [WARNING] Ignoring unrecognized line: ?? bundles/s7imaging/pom.xml.releaseBackup [WARNING] Ignoring unrecognized line: ?? bundles/s7imaging/release.properties {code} 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}} {{release.properties}}. >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|https://git-wip-us.apache.org/repos/asf?p=maven-scm.git;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/GitStatusConsumer.java;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 What worked for me was going back to an older release plugin, as @Martin Ellis above did: * git 2.0.0 * release plugin 2.3.2 (did not try other versions) * git config: {{status.displayCommentPrefix = true}} (changed in git 1.8.5, afaiu that's what the release plugin 2.5 tries to fix) {code} git config status.displayCommentPrefix true mvn maven-release-plugin:2.3.2:prepare mvn maven-release-plugin:2.3.2:perform {code} was (Author: aklimets): h3. Issue with untracked files in git status --porcelain output One problem (but not the only one) is in those lines: {code} [WARNING] Ignoring unrecognized line: ?? bundles/s7imaging/pom.xml.releaseBackup [WARNING] Ignoring unrecognized line: ?? bundles/s7imaging/release.properties {code} 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}} {{release.properties}}. >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|https://git-wip-us.apache.org/repos/asf?p=maven-scm.git;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/GitStatusConsumer.java;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 What worked for me was going back to an older release plugin, as @Martin Ellis above did: * git 2.0.0 * release plugin 2.3.2 (did not try other versions) * git config: {{status.displayCommentPrefix = true}} (changed in git 1.8.5, afaiu that's what the release plugin 2.5 tries to fix) {code} git config status.displayCommentPrefix false mvn maven-release-plugin:2.3.2:prepare mvn maven-release-plugin:2.3.2:perform {code} > release:prepare does not commit pom.xml if not in the git root > -------------------------------------------------------------- > > Key: MRELEASE-875 > URL: https://jira.codehaus.org/browse/MRELEASE-875 > 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 (v6.1.6#6162)