I'm trying to configure maven-jaxb2-plugin to only generate java if XSD changes. That doesn't seem to work because java classes are always regenerated. This is the plugin configuration :
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.3</version>
<configuration>
<generateDirectory>${basedir}/src/main/java/</generateDirectory>
<strict>true</strict>
<verbose>true</verbose>
<readOnly>true</readOnly>
<episode>true</episode>
<forceRegenerate>false</forceRegenerate>
<removeOldOutput>false</removeOldOutput>
</configuration>
<executions>
<execution>
<id>commun-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<generatePackage>my.package.dest</generatePackage>
<schemaDirectory>${basedir}/src/main/resources/schemas/wsrest</schemaDirectory>
<bindingDirectory>${basedir}/src/main/resources/schemas/wsrest</bindingDirectory>
<bindingIncludes>
<include>bindings.xml</include>
</bindingIncludes>
<episodeFile>${basedir}/src/main/java/META-INF/sun-jaxb_commun.episode</episodeFile>
</configuration>
</execution>
When building (maven clean install or maven install) i can observe this output :
[INFO] File [D:\IDE\Data\Eclipse\workspace\MyProject\src\main\resources\schemas\wsrest\myXSD.xsd] was changed since the last build.
[INFO] File [D:\IDE\Data\Eclipse\workspace\MyProject\src\main\resources\schemas\wsrest\bindings.xml] was changed since the last build.
[INFO] File [D:\IDE\Data\Eclipse\workspace\MyProject\pom.xml] was changed since the last build.
But i didn't change anything in theses files since the last build!
What am i doing wrong?
Thanks in advance
Clément