我正在使用https://spring.io/guides/gs/producing-web-service/#initial上的教程来尝试生成SOAP Web服务.我正在使用Gradle来管理我的依赖项.
我有一个.xsd文件,它指定了我想要gradle创建的某些类.
但是,当我尝试在eclipse中的build.gradle文件上运行gradle构建时,我收到以下错误:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\zekucukkose\workspace2\gs-producing-web-service-initial\build.gradle'
line: 32
* What went wrong:
A problem occurred evaluating root project 'gs-producing-web-service-initial'.
> Could not find method jaxb() for arguments [com.sun.xml.bind:jaxb-xjc:2.2.4-1]
on root project 'gs-producing-web-service-initial'.
Run Code Online (Sandbox Code Playgroud)
第27至34行如下:
27 dependencies {
28 compile("org.springframework.boot:spring-boot-starter-web")
29 compile("org.springframework.boot:spring-boot-starter-ws")
30 testCompile("org.springframework.boot:spring-boot-starter-test")
31 compile("wsdl4j:wsdl4j:1.6.1")
32 jaxb("com.sun.xml.bind:jaxb-xjc:2.2.4-1")
33 compile(files(genJaxb.classesDir).builtBy(genJaxb))
34 }
Run Code Online (Sandbox Code Playgroud)
就我所知,jaxb是用于生成实际类的东西.
如果有人可以提供帮助,我真的很感激.谢谢
这是整个脚本:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.7.RELEASE")
}
}
apply plugin: 'java'
apply plugin: …Run Code Online (Sandbox Code Playgroud)