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

Michael Osipov edited comment on SCM-990 at 5/31/22 7:08 PM:
-------------------------------------------------------------

What about: 
https://www.codeaffine.com/2014/09/22/access-git-repository-with-jgit/
{code:java}
repositoryBuilder.findGitDir( new F‌ile( "/home/user/git/foo/bar" ) );
{code}


was (Author: michael-o):
What about: 
https://www.codeaffine.com/2014/09/22/access-git-repository-with-jgit/
{code:java}
https://www.codeaffine.com/2014/09/22/access-git-repository-with-jgit/
{code}

> Jgit Provider cannot resolve Repository in multi-module Maven Project
> ---------------------------------------------------------------------
>
>                 Key: SCM-990
>                 URL: https://issues.apache.org/jira/browse/SCM-990
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-jgit
>            Reporter: Enrico Horn
>            Priority: Major
>
> The JGit providers info command (and probably others) uses fielset.basedir as 
> git working directory. When running maven command in a submodule this will 
> result in the following error:
>  
> Cannot get the revision information from the scm repository : 
> [ERROR] Exception while executing SCM command. JGit resolve failure! 
> repository not found: <submodule folder>
>  
> What it should do instead is act like the git binary and search for the git 
> directory in parent directories if none found in the current one. Jgit has 
> the API FileRepositoryBuilder.findGitDir to do that.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to