1
votes

I'm trying to generate a schema by using WSDL URL, but failed and got this error code:

Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed: Plugin org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:jar:0.12.3, org.glassfish.jaxb:jaxb-runtime:jar:2.2.11, org.glassfish.jaxb:jaxb-xjc:jar:2.2.11, org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2: Failure to transfer org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:jar:0.12.3 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:jar:0.12.3 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled. (org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate:default:generate-sources)

My POM :

         <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <version>0.12.3</version>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <schemaLanguage>WSDL</schemaLanguage>
                <generatePackage>soap.test</generatePackage>
                <schemas>
                    <schema>
                        <url>http://www.webservicex.com/globalweather.asmx?wsdl</url>
                    </schema>
                </schemas>
            </configuration>
        </plugin>

I tried to downgrade the version but I still got the same error.

Any advice?

Thanks in advance.

3

3 Answers

0
votes

You seem to have a problem with your local maven repository. Locate your repository folder and delete everything under org/jvnet/jaxb2/maven2.

0
votes

try it without version:

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <schemaLanguage>WSDL</schemaLanguage>
                <generatePackage>com.concretepage.wsdl</generatePackage>
                <forceRegenerate>true</forceRegenerate>
                <schemas>
                    <schema>
                        <url>http://www.webservicex.com/globalweather.asmx?wsdl</url>
                    </schema>
                </schemas>
            </configuration>
        </plugin>
0
votes

Remove the version. org.springframework.boot spring-boot-maven-plugin org.jvnet.jaxb2.maven2 maven-jaxb2-plugin 0 generate /src/main/resources/wsdl *.wsdl