java.lang.NoSuchMethodError: org.gradle.api.model.ObjectFactory.fileProperty()Lorg/gradle/api/file/RegularFileProperty;
Closed this issue · 1 comments
rolaca11 commented
I have a simple gradle project with this plugin, that generates Java classes from .xsd files.
plugins {
id 'java'
id 'com.intershop.gradle.jaxb' version '3.0.4'
}
group 'com.generali.kut'
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenCentral()
}
jaxb {
javaGen {
posConfig {
packageName = ''
schemas = fileTree(dir: 'src/main/resources/WEB-INF/wsdl/', include: '**/*.xsd')
}
}
}
When I run the 'jaxb' task, I get the following error:
Caused by: java.lang.NoSuchMethodError: org.gradle.api.model.ObjectFactory.fileProperty()Lorg/gradle/api/file/RegularFileProperty;
at com.intershop.gradle.jaxb.extension.SchemaToJava.(SchemaToJava.groovy:328)
at com.intershop.gradle.jaxb.extension.SchemaToJavaFactory.create(SchemaToJavaFactory.groovy:33)
I can post the whole stacktrace if you want, but this is the important part
m-raab commented
Please check your Gradle version. The missing class was introduced in Gradle 4.3. Therefore I added the note "Version 3 of this plugin will only work with Gradle 5 and JDK 8."