我最近从 Ubuntu 切换到 Windows 10,我无法再生成源代码。我的 pom.xml 的相关部分如下
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf-codegen-plugin.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/postcode/find_1_10.wsdl</wsdl>
<wsdlLocation>classpath:postcode/find_1_10.wsdl</wsdlLocation>
<extraargs>
<extraarg>-p</extraarg>
<extraarg>uk.co.postcodeanywhere.services.find</extraarg>
</extraargs>
</wsdlOption>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/postcode/postzon_1_40.wsdl</wsdl>
<wsdlLocation>classpath:postcode/postzon_1_40.wsdl</wsdlLocation>
<extraargs>
<extraarg>-p</extraarg>
<extraarg>uk.co.postcodeanywhere.services.postzon</extraarg>
</extraargs>
</wsdlOption>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/postcode/retrievebyaddress_1_20.wsdl</wsdl>
<wsdlLocation>classpath:postcode/retrievebyaddress_1_20.wsdl</wsdlLocation>
<extraargs>
<extraarg>-p</extraarg>
<extraarg>uk.co.postcodeanywhere.services.retrievebyaddress</extraarg>
</extraargs>
</wsdlOption>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/postcode/retrievebyid_1_30.wsdl</wsdl>
<wsdlLocation>classpath:postcode/retrievebyid_1_30.wsdl</wsdlLocation>
<extraargs>
<extraarg>-p</extraarg>
<extraarg>uk.co.postcodeanywhere.services.retrievebyid</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
maven构建过程中的错误如下
[WARNING] The POM for com.sun.xml.bind:jaxb-xjc:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Running code generation in fork mode...
[INFO] The java executable is C:\Java\jdk-11.0.1_windows-x64_bin\jdk-11.0.1\bin\java.exe
[INFO] Building jar: C:\Users\MATTHE~1\AppData\Local\Temp\cxf-tmp-819761540992222663\cxf-codegen12512113659748193013.jar
[INFO] Error occurred during initialization of boot layer
[INFO] java.lang.module.FindException: Module java.xml.ws not found
我尝试使用 jdk 8 进行测试,但似乎只能从 oracle 网站下载 JRE