Closed pascalgrimaud closed 8 years ago
This also happens on maven if you do git init
and then try to build or run in production. This affects the yo jhipster:heroku
subgenerator because it calls git init
if a repository does not exist. It works fine as long as you don't have a git repository or have at least one commit in the repository. Error message is below:
[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.1:revision (default) on project test-3: Could not complete Mojo execution... Error: Could not get HEAD Ref, are you sure you have some commits in the dotGitDirectory? -> [Help 1]
Is this related to the commit info endpoint change recently? Coz there was no such issue before?
Thanks & regards, Deepu
On 7 Sep 2016 04:36, "Jon Ruddell" notifications@github.com wrote:
This also happens on maven if you do git init and then try to build or run in production. This affects the yo jhipster:heroku subgenerator because it calls git init if a repository does not exist. It works fine as long as you don't have a git repository or have at least one commit in the repository. Error message is below:
[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.1:revision (default) on project test-3: Could not complete Mojo execution... Error: Could not get HEAD Ref, are you sure you have some commits in the dotGitDirectory? -> [Help 1]
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/4087#issuecomment-245123603, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDlF8tiPauUPWO7selxby4tR2vOYT8qks5qnfHggaJpZM4J2U-w .
Exact @deepu105
The good thing is that I'll be with the culprit @PierreBesson in 2 hours :-)
IMO we shouldn't make git repo mandatory for projects, but if its required then better we init one after generation in our install phase
Thanks & regards, Deepu
On 7 Sep 2016 11:12, "Julien Dubois" notifications@github.com wrote:
The good thing is that I'll be with the culprit @PierreBesson https://github.com/PierreBesson in 2 hours :-)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/4087#issuecomment-245180852, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDlFzZM5A3-SGotUuD24eCaNC0b4h2lks5qnk6vgaJpZM4J2U-w .
No Git should not be mandatory. I have clients with this big entreprise IBM software called Jazz, which in fact is CVS :-)
Agree, there is no question of forcing git onto people. I'm looking into the issue right now. [EDIT] A bit disappointed by https://github.com/n0mer/gradle-git-properties, only 15 stars and so little features, also fails when no git repo is present. We might better do our own custom task for gradle. It should take about 10 lines of code.
The real issue is that ajoberstar/gradle-git has a bug that makes it fail when git is not initialized, see https://github.com/ajoberstar/gradle-git/issues/205 So for now we must remove this feature from the gradle build. Then we will add it back when the issue will be fixed in gradle-git. Also maybe we can write our own generateGitProperties task that uses gradle-git directly.
Really, the only problem is that GrgitPlugin.groovy doesn't catch errors when trying to open a git repo. Maybe we can submit a PR to fix it.
The more I work on this feature, the more I realize thats it's not trivial to set up (at least for gradle) and it will be useful for our users.
Just noticed @ruddell comment, this is bad that it breaks the heroku subgen for maven also. So basically it is causing many problems right now. I think https://github.com/jhipster/generator-jhipster/commit/0ccf6e4d47bb6fc3a88ecc8ed3515030ec4c4d3e must be reverted completely. I will do the feature later and do more testing.
Yes, can you revert it? Anyway as long as we don't have the UI for it, it's not a big issue.
Closing as the PR is merged
Overview of the issue
When using gradle, the build in production fail if the user didn't init a git repo with
git init
-> no folder.git
So @jdubois don't make release before this ticket is resolved plzReproduce the error
1) generate a gradle project 2) ./gradlew -Pprod bootRepackage
Here the stacktrace:
Related issues
Related to https://github.com/jhipster/generator-jhipster/pull/4018 As you coded this, @PierreBesson can you have a look plz ? Sorry, I didn't have a close look on what you did and what it is used for ^^
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folderEntity configuration(s)
entityName.json
files generated in the.jhipster
directoryls: no such file or directory: .jhipster/*.json
Browsers and Operating System
openjdk version "1.8.0_91" OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14) OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
git version 2.7.4
node: v4.5.0
npm: 3.10.6
bower: 1.7.9
gulp: [23:52:14] CLI version 1.2.2 [23:52:14] Local version 3.9.1
yeoman: 1.8.4
Docker version 1.12.1, build 23cf638
docker-compose version 1.8.0, build f3628c7