我正試圖從兩個XSD
模式生成源代碼。我的JAXB
maven插件看起來像這樣:Maven JAXB插件只執行一次執行
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>GenerateKenexa</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<includeBindings>
<includeBinding>**/jaxb-bindings-kenexa.xml</includeBinding>
</includeBindings>
<includeSchemas>
<includeSchema>**/KenexaXMLConfiguration.xsd</includeSchema>
</includeSchemas>
</configuration>
</execution>
<execution>
<id>GenerateTalentQ</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<includeBindings>
<includeBinding>**/jaxb-bindings-talentq.xml</includeBinding>
</includeBindings>
<includeSchemas>
<includeSchema>**/TalentQXMLConfiguration.xsd</includeSchema>
</includeSchemas>
</configuration>
</execution>
</executions>
</plugin>
第一個生成正常。但第二個不是。我看到在maven輸出:
[INFO] --- maven-jaxb-plugin:1.1.1:generate (GenerateKenexa) @ online.tests.management ---
[INFO] Compiling file:/D:/Projects/GTIWebApplications/gti_online_tests_management/src/main/resources/xsd/KenexaXMLConfiguration.xsd
[INFO] Writing output to D:\Projects\GTIWebApplications\gti_online_tests_management\target\generated-sources\xjc
[INFO]
[INFO] --- maven-jaxb-plugin:1.1.1:generate (GenerateTalentQ) @ online.tests.management ---
[INFO] files are up to date
它說文件是最新的,但他們甚至沒有生成。什麼可能是錯的?
謝謝。同樣的問題,同樣的解 –