运行mvn clean install时,有什么方法可以从yml生成Java类吗?它确实可以在xml和json中使用,但在yml中却找不到。
我尝试了xml和json,并且它们对它们都可以正常工作。但是yml没有太多可用
对于XML,我尝试了以下方法:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<xjbSources>
<xjbSource>src/main/resources/global.xjb</xjbSource>
</xjbSources>
<sources>
<source>src/main/resources/schema.xsd</source>
</sources>
</configuration>
</plugin>
</plugins>
</build>
不适用于yml中的任何插件