从Groovy迁移到Kotlin,在wsdl2java生成过程中遇到了一个简单的问题。
问题很简单,有人有相关的好例子吗?谷歌并没有提供很好的帮助,Kotlin DSL在语法方面也不是很好。
同时使用OpenJDK11。
plugins {
id("no.nils.wsdl2java") version "0.10"
}
wsdl2java {
enabled = true
wsdlsToGenerate = [
[
"-xjc",
"-p", "bla.bla.generated",
"-wsdlLocation", "classpath:wsdl/v1.wsdl",
"-autoNameResolution", "$projectDir/src/main/resources/wsdl/v1.wsdl"
],
[
"-xjc",
"-p", "bla.bla.generated",
"-wsdlLocation", "classpath:wsdl/v2.wsdl",
"-autoNameResolution", "$projectDir/src/main/resources/wsdl/v2.wsdl"
]]
generatedWsdlDir = file("$projectDir/src/main/java")
wsdlDir = file("$projectDir/src/main/resources/wsdl")
}
dependencies {
implementation(project(":common"))
implementation(project(":etcd"))
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-hateoas")
implementation("org.springframework.boot:spring-boot-starter-quartz")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-web-services")
api("no.nils:wsdl2java")
compileOnly("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
}
tasks.jar {
archiveFileName.set("ext.jar")
}