maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Dangel (JIRA)" <>
Subject [jira] (SCM-740) Maven Release Plugin releases SNAPSHOT instead of STABLE version
Date Wed, 12 Feb 2014 21:21:57 GMT


Andreas Dangel commented on SCM-740:

By default - maven-release-plugin 2.4.2 uses scm 1.7.
Once git has been localized, gitexe failed to parse "git status", hence SCM-686 was done.

LANG=C gives you an English git output - however, this is not enough anymore.
It seems that git has been modified, to not return "#" as the git status output - which could
be a git bug, as the man page still mentions this behavior.

1. Create a git wrapper shell script
if [ "$1" = "status" ]; then
  OUTPUT=$(/usr/bin/git status)
  for line in $OUTPUT; do
    echo "#$line"
  /usr/bin/git $*

2. make sure you switch to English (e.g. {{export LANG=C}})
3. make sure, the git-wrapper script is in the path before the usual git binary (e.g. {{export
4. run {{mvn release:prepare}} - it should work now

I also tried scm 1.9 and could reproduce the problem - it only happens, if you have a subdirectory
and you are not releasing from the toplevel repository directory.
To run mvn release plugin with scm 1.9, add the following dependencies:

> Maven Release Plugin releases SNAPSHOT instead of STABLE version
> ----------------------------------------------------------------
>                 Key: SCM-740
>                 URL:
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>         Environment: Everywhere with maven-scm-provider-gitexe of version 1.9 (and maybe
>            Reporter: Jan Novotný
>         Attachments: Wrong_base_directory_used1.patch
> If you have following project structure:
> - superproject [Git repository root]
>   - projectA [release target]
>   - projectB [release target]
> in other words you release subproject of a larger Git repository separately, you probably
run at the same issue as we did. No recipe from above mentioned sources solves your problems
and during release:prepare phase still no commit of stable pom.xml occurs. There is another
bug in GitStatusConsumer class that checks output of the git status --porcelain command and
verifies existency of the mentioned files on local filesystem. Regretfully it uses working
directory instead of git repository root as the base folder and thus it constructs invalid
path to the file where project folder directory is duplicated.
> Problem is better described here:

This message was sent by Atlassian JIRA

View raw message