Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Output a meaningful error message if Git metadata cannot be found #115

Open
ferrarimarco opened this issue May 25, 2017 · 2 comments
Open

Comments

@ferrarimarco
Copy link

Hi. I had this error when building my Maven project in a Docker container:

[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report (default-cli) on project database-uploader: Build error: One of setGitDir or setWorkTree must be called

My Maven project was not in the root of the repository and I was mounting only the subdirectory in the build container. I solved by mounting the root of the project (which contains the .git directory).

Here you can see the full build log: https://travis-ci.org/aifa-gov-it/invoices-processor/jobs/235953051

It could be useful to output an error message explaining the situation.

@vitalijr2
Copy link

I've met the same issue. But my repository is not a Git repository at all.

@slachiewicz
Copy link

Looks like git repository is required

Caused by: java.lang.IllegalArgumentException: One of setGitDir or setWorkTree must be called.
    at org.eclipse.jgit.lib.BaseRepositoryBuilder.requireGitDirOrWorkTree (BaseRepositoryBuilder.java:590)
    at org.eclipse.jgit.lib.BaseRepositoryBuilder.setup (BaseRepositoryBuilder.java:555)
    at org.eclipse.jgit.lib.BaseRepositoryBuilder.build (BaseRepositoryBuilder.java:580)
    at org.eluder.coveralls.maven.plugin.domain.GitRepository.load (GitRepository.java:51)
    at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.createJob (CoverallsReportMojo.java:322)
    at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.execute (CoverallsReportMojo.java:238)

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

No branches or pull requests

3 participants