[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[m2e-users] m2e doesn't appear to be rerunning xjc on save of xsd
|
I've been working occasionally on a Maven app that uses CXF's XJC plugin to generate Java code from an XSD. I'm pretty sure I've seen Eclipse regenerate the Java code when I saved the XSD, which then recompiles those classes. This is a very good thing to happen automatically.
Recently I've noticed that this doesn't appear to be happening. I just tested this now. I made a relevant change to the xsd and saved it. Eclipse went into "Building workspace", but it didn't appear to regenerate the code. I checked the timestamp on the generated file, and it wasn't updated. In this test case, I had also made a change in a Java class that references one of the generated types, and I was trying to reference a property that should have been there if the code was properly generated from the xsd. If everything worked correctly, the red squigglies should have disappeared after I changed the xsd.
I believe this section of my pom is relevant:
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<versionRange>[2.4.0,)</versionRange>
<goals>
<goal>xsdtojava</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
In Project Properties, I inspected the Lifecycle Mapping. In the "generate-sources" phase, it had cxf-xjc-plugin:xsdtojava, with "execute" mapping, and source "pom".
I'm on STS 2.9.2 with the latest m2e.
What am I missing?