Devskiller / jpa2ddl

JPA Schema Generator Plugin
Apache License 2.0
110 stars 33 forks source link

Gradle setup issue Can't generate proxy for class #18

Closed lucasmontec closed 6 years ago

lucasmontec commented 6 years ago

Hi, I'm getting the following problem at setup:

A problem occurred evaluating root project 'xxxxx'.

Failed to apply plugin [id 'com.devskiller.jpa2ddl'] Could not generate a proxy class for class com.devskiller.jpa2ddl.GeneratePluginExtension.

I'm using a similar setup script from the one in the readme:

jpa2ddl {
    packages = ['some.package.domain', 'somepackage.security.domain']
    outputPath = '${basedir}/src/main/resources/migrations/'
    jpaProperties = [
        property {
            name = 'hibernate.dialect'
            value = 'org.hibernate.dialect.H2Dialect'
        }
    ]
    action = 'UPDATE'
}
jkubrynski commented 6 years ago

Hi, which Gradle version do you use? Which Java version? Any specific plugins or configuration?

lucasmontec commented 6 years ago

https://pastebin.com/iARPTzzH

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

2018-03-14 10:07 GMT-03:00 Jakub Kubryński notifications@github.com:

Hi, which Gradle version do you use? Any specific plugins or configuration?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Devskiller/jpa2ddl/issues/18#issuecomment-373014188, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUb_S1gPQE0lMBnnjvyhir3-qoBFg3Iks5teRYSgaJpZM4SqYtM .

-- Lucas Montenegro Carvalhaes

May the sawce be with you

jkubrynski commented 6 years ago

And which Gradle version?

lucasmontec commented 6 years ago

Sorry for the delay:

$ ./gradlew --version


Gradle 3.5.1

Build time: 2017-06-16 14:36:27 UTC Revision: d4c3bb4eac74bd0a3c70a0d213709e484193e251

Groovy: 2.4.10 Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015 JVM: 1.8.0_92 (Oracle Corporation 25.92-b14) OS: Windows 10 10.0 amd64

2018-03-15 8:16 GMT-03:00 Jakub Kubryński notifications@github.com:

And which Gradle version?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Devskiller/jpa2ddl/issues/18#issuecomment-373342328, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUb_cb0_7GhwlnaYcQ7aLTMocR6tzNPks5tek2egaJpZM4SqYtM .

-- Lucas Montenegro Carvalhaes

May the sawce be with you

jkubrynski commented 6 years ago

Could you please try with the latest version of Gradle?

lucasmontec commented 6 years ago

​I'll try but later. I'll report as soon as I have results. ​

2018-03-15 9:49 GMT-03:00 Jakub Kubryński notifications@github.com:

Could you please try with the latest version of Gradle?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Devskiller/jpa2ddl/issues/18#issuecomment-373364530, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUb_daDMZWkoN_Y97Y1n1h6vCFf5XD2ks5temM_gaJpZM4SqYtM .

-- Lucas Montenegro Carvalhaes

May the sawce be with you

lucasmontec commented 6 years ago

Using gradle 4.6 I get: Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '${basedir}/src/main/resources/migrations/' with class 'java.lang.String' to class 'java.io.File'

The directory exists. (sorry for the delay)

lucasmontec commented 6 years ago

Changing the output path declaration to: outputPath = file('${basedir}/src/main/resources/migrations/')

causes another error:

jkubrynski commented 6 years ago

I've just checked with Gradle 4.6 and 4.7 and it works without any errors. Could you please provide me with the sample project to reproduce the issue?

jkubrynski commented 6 years ago

Closing, as there was no action from the reporter. Feel free if it still occurs