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

ASF GitHub Bot commented on SCM-668:
------------------------------------

jira-importer commented on issue #881:
URL: https://github.com/apache/maven-scm/issues/881#issuecomment-2964631057

   **[Michael 
Osipov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=michael-o)**
 commented
   
   This issue has been auto closed because it has been inactive for a long 
period of time. If you think this issue still applies, retest your problem with 
the most recent version of Maven and the affected component, reopen and post 
your results.
   




> Unable to get revision number with Git and SVN 1.7
> --------------------------------------------------
>
>                 Key: SCM-668
>                 URL: https://issues.apache.org/jira/browse/SCM-668
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Bug
>          Components: maven-scm-api
>    Affects Versions: 1.7
>         Environment: Mac OS X Snow Leopard
> Maven 2 and 3
> Maven SCM 1.7 and previous ones
> Multi modules project
>            Reporter: Laurent Prévost
>            Priority: Major
>
> I am unable to use the plugin buildnumber-maven-plugin to get the revision 
> number with Git and SVN. After some investigations, I realized that the 
> plugin used the Maven-SCM-API and their providers.
> The command issued by the plugin is
> {code}
> /bin/sh -c cd /tmp/temp/mytestingrepo && git rev-parse --verify --short=7 HEAD
> {code}
> I run this command directly in a shell with the following error
> {code}
> fatal: Not a git repository (or any of the parent directories): .git
> {code}
> When I modify the command like the following one, it works perfectly
> {code}
> /bin/sh -c "cd /tmp/temp/mytestingrepo && git rev-parse --verify --short=7 
> HEAD"
> {code}
> It seems that the command is not executed correctly on my environment where 
> the 
> {code}
> /bin/sh -c "cd /tmp/temp/mytestingrepo
> {code}
> is executed and afterwards the command
> {code}
> git rev-parse --verify --short=7 HEAD
> {code}
> is done in the current directory. In the case of SVN 1.7 and Git, the .svn or 
> .git are not located in subdirectories where the second command is executed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to