java – Spring toolsuite为maven-jaxb2-plugin显示错误
作者:互联网
我正在使用Spring Tool Suite版本3.7.0.RELEASE,我正在尝试导入亚马逊提供的WSDL.导入成功,但Eclipse在标记上给出了错误消息.
我使用以下pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>blafoo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>blafoo</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.5.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- tag::wsdl[] -->
<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>be.goedkoperzoeken.amazonapi.wsdl</generatePackage>
<schemas>
<schema>
<url>http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl</url>
</schema>
</schemas>
</configuration>
</plugin>
<!-- end::wsdl[] -->
</plugins>
</build>
</project>
当鼠标悬停在此标记上时,我收到以下错误消息:
Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed: A required class was missing while executing org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate: com/sun/xml/bind/v2/model/core/TypeInfoSet
解决方法:
我能够通过放置我的< plugins>来解决这个问题.在< pluginManagement>内标签.不知何故,这使得它与maven不同,它实际上获取了正确的信息.
标签:java,eclipse,spring,jaxb,maven-jaxb2-plugin 来源: https://codeday.me/bug/20190715/1466212.html