Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Multiproject - "fatal: Not a git repository (or any of the parent directories): .git" #37

Open
mslinn opened this issue Nov 12, 2017 · 1 comment

Comments

@mslinn
Copy link

mslinn commented Nov 12, 2017

The Problems

I have a multiproject that I am struggling to make work with sbt-ghpages and SBT 0.13.16. The subprojects are called root and demo, in similarly named directories. I would like to be able to generate Scaladoc for each of the subprojects, and push them both to gh-pages somehow.

  1. The first problem manifests in the multi git branch:

    $ sbt
    .. lots of output ...
    
    Reference to undefined setting:
    web3j-scala/*:gitRemoteRepo from web3j-scala/*:ghpagesUpdatedRepository ((com.typesafe.sbt.sbtghpages.GhpagesPlugin) GhpagesPlugin.scala:36)
    

    This problem was reported September 8, 2015 in not working on project with multiple git repos sbt-git#97, and the solution suggested by @wpc009 on Mar 14, 2016 can be rewritten for SBT 0.13.16+ as:

     GitKeys.gitReader in ThisProject := baseDirectory(base => new DefaultReadableGit(base)).value,
    

    However, adding that line into common settings does nothing.

    BTW, the root project in the master git branch is not in a subdirectory, so the above problem does not manifest for that git branch. However, ghpagesPushSite does not work for the demo sbt subproject in that branch for the same reason: the .git directory is a sibling of the demo directory, instead of the .git directory being a child of the demo directory.

  2. The second problem: Given N different subprojects, each of which might want to publish its own Scaladoc, I can image two ways of structuring the Scaladoc; are either of these options possible?
    a. N different git branches would hold the generated Scaladoc for each of the N sbt subprojects; the branches might be named after the sbt subprojects
    b. N different subdirectories would be created in the gh-pages branch, under the usual latest/api/ directory; the subdirectories might be named after the sbt subprojects. For example:

    http://mslinn.github.io/web3j-scala/latest/api/project1name/index.html
    http://mslinn.github.io/web3j-scala/latest/api/project2name/index.html
    http://mslinn.github.io/web3j-scala/latest/api/project3name/index.html
    http://mslinn.github.io/web3j-scala/latest/api/project4name/index.html

    What is the recommended way forward?

The solution(s) to both of these questions/problems should probably be added to the README for this project.

@FA5I
Copy link

FA5I commented Jul 12, 2020

I am having the same issue, following the docs leads me to the same error. Is there a way to fix this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants