0

i recently switched from Ubuntu to Windows 10 and i can't generate sources any more. the relevant section of my pom.xml is as follows

<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>

the error during the maven build is as follows

[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

i tried to test with jdk 8 but it seems to only download a JRE from the oracle website

MitchBroadhead
  • 811
  • 14
  • 23
  • You can download JDK8 here: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. Addintionally the warning suggests that the pom of jaxb-xjc is invalid. Did you try to delete it from your local repo and let maven download it again? – DrHopfen Dec 17 '18 at 10:35
  • yes i deleted entire bind directory. i downloaded the jdk but when i install it there is no javac command in the bin. i finally got it working by specifying the dependencies inside the section, even though they should have been available in the path – MitchBroadhead Dec 17 '18 at 10:55

0 Answers0