Closed jesperdj closed 6 years ago
It seems that the generation crashes when schemagen expects an episode file and there is none. Will investigate if schemagen actually works without an episode file (which I suspect it does) and find the effect on the plugin and the generated schema.
As a workaround, simply generate the episode file. The configuration setting for the plugin which works is found below.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>schemagen</goal>
</goals>
</execution>
</executions>
<configuration>
<transformSchemas>
<transformSchema>
<uri>http://www.jesperdj.com/jaxb-demo</uri>
<toFile>purchaseOrder.xsd</toFile>
</transformSchema>
</transformSchemas>
<!-- generateEpisode>false</generateEpisode -->
</configuration>
</plugin>
Plugin: jaxb2-maven-plugin version 2.3.1
When I add
<generateEpisode>false</generateEpisode>
to the configuration of the jaxb2-maven-plugin, then I get an error because the episode file is not found.I don't want to generate an episode file, but in the Maven output I see that the plugin is specifying the
-episode
option to schemagen anyway.Output of running
mvn clean package
:Example project to demonstrate the issue:
jaxb2-plugin-bug.zip