I'm using no.nils.wsdl2java plugin, full gradle.build file looks like:
plugins {
id 'org.springframework.boot' version '2.3.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.12.RELEASE'
id 'java'
id "no.nils.wsdl2java" version "0.10"
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
jaxb
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.oracle.database.jdbc:ojdbc8'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation group: 'com.oracle.ojdbc', name: 'orai18n', version: '19.3.0.0'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'com.google.code.gson:gson:2.8.5'
}
tasks.named('test') {
useJUnitPlatform()
}
wsdl2java {
generatedWsdlDir = file("build/generated/wsdl/Service")
wsdlsToGenerate = [
['-p', 'Service', '-wsdlLocation', 'classpath:wsdl/Service.wsdl',
'-autoNameResolution', "src/main/resources/wsdl/Service.wsdl"]
]
}
When i'm building project with gradle jvm version 11, getting exception:
Unable to load class 'jakarta.xml.bind.JAXBException'.
** But on version 8 getting error :
org/apache/cxf/tools/wsdlto/WSDLToJava has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0.
I know about javax -> jakarta namespace migration but how to fix my problem?