Generator-jhipster: Downgrade gradle wrapper to 4.9

Created on 12 Sep 2018  Â·  9Comments  Â·  Source: jhipster/generator-jhipster

Overview of the issue

When generating a new application with the options bellow the generator add a line in the wrong place on build.gradle

apply from: 'gradle/docker.gradle'
apply from: 'gradle/sonar.gradle'
hibernate:spring:com.test.domain?dialect=org.hibernate.dialect.PostgreSQL82Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
apply from: 'gradle/swagger.gradle'
//jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here
Motivation for or Use Case

It prevents building the project.

Reproduce the error

Just create a new application with the options bellow.

Related issues
Suggest a Fix
JHipster Version(s)

5.3.1

JHipster configuration
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.test",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "5.3.1",
    "applicationType": "monolith",
    "baseName": "hipster",
    "packageName": "com.test",
    "packageFolder": "com/test",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": "spring-websocket",
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "prodDatabaseType": "postgresql",
    "searchEngine": "elasticsearch",
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "gradle",
    "enableSwaggerCodegen": true,
    "jwtSecretKey": "",
    "clientFramework": "angularX",
    "useSass": true,
    "clientPackageManager": "npm",
    "testFrameworks": [
      "cucumber"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en",
      "pt-br"
    ]
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System

Windows 10, jdk 8

  • [ x] Checking this box is mandatory (this is just to show you read everything)
gradle

All 9 comments

Thanks for reporting the issue. This text was removed in https://github.com/jhipster/generator-jhipster/pull/8238. It looks like we have another issue with that configuration though:

Script '/private/tmp/jh/projectname/gradle/swagger.gradle' line: 5

* What went wrong:
A problem occurred evaluating script.
> org.gradle.kotlin.dsl.NamedDomainObjectContainerScope.invoke(Ljava/lang/String;Lkotlin/reflect/KClass;)Ljava/lang/Object;

Yes, I did some research about this error and found it:

openapi-generator-gradle-plugin - Failure with Gradle 4.10

I was going to report it but I did a quick check on the open issues and it looks like the Swagger support will be updated soon.

Cheers.

Try the wrapper we provide it is still 4.9 for some reasons.

On Wed, Sep 12, 2018, 07:59 Carlos Augusto de Oliveira <
[email protected]> wrote:

Yes, I did some research about this error and found it:

[https://github.com/OpenAPITools/openapi-generator/issues/962]
[openapi-generator-gradle-plugin] - Failure with Gradle 4.10 #962
https://github.com/jhipster/generator-jhipster/pull/962

I was going to report it but I did a quick check on the open issues and it
looks like the Swagger support will be updated soon.

Cheers.

—
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/8295#issuecomment-420521986,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMaiempNDjX23prz_KNxYpl7_dJWnNgks5uaKKjgaJpZM4WkldU
.

@atomfrede the wrapper is currently on 4.10 and I wonder if it's not my fault (and if that's the case, I'm deeply sorry). @carloca68 can you try with 4.9 to see if that fixes the issue?

@jdubois Oh I see, didn't realize it. But I had some problems with other plugins and 4.10 and I thought we are still on 4.9 :)

Do you want me to switch back? I guess I did this when working on the jcenter() issues.

Maybe it is enough to document that somewhere and wait for the update of the open api generator as it seems the fix already done.

I will downgrade the wrapper and close this issue afterwards

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deepu105 picture deepu105  Â·  53Comments

ddewaele picture ddewaele  Â·  72Comments

pochadri picture pochadri  Â·  61Comments

loydjayme25 picture loydjayme25  Â·  71Comments

yelhouti picture yelhouti  Â·  75Comments