Hello,
We experienced a very strange issue with our continuous builds (and
some developper builds) lately with jaxb. An API generated from XSD's
stopped generating the isSet methods for no known reasons. Our setup
consists of the following:
JDK 1.6
Maven 2 (under Windows and Linux have the same issue) with SVN
jaxb2 maven plugin version 0.7.1 with the following setup:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<generatePackage>${project.groupId}.dto</generatePackage>
<generateDirectory>${project.build.directory}/jaxb/xsdimport/java
</generateDirectory>
<schemaDirectory>${project.build.directory}/xsd
</schemaDirectory>
<schemaLanguage>XMLSCHEMA</schemaLanguage>
<schemaIncludes>
<include>*RQ.xsd</include>
<include>*RS.xsd</include>
</schemaIncludes>
<bindingDirectory>${basedir}/src/jaxb</bindingDirectory>
<bindingIncludes>
<include>custom-schema.xml</include>
</bindingIncludes>
<strict>false</strict>
<verbose>false</verbose>
<episode>true</episode>
<removeOldOutput>true</removeOldOutput>
<forceRegenerate>true</forceRegenerate>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<extension>true</extension>
<args>
<arg>-npa</arg>
</args>
<plugins>
</plugins>
</configuration>
</plugin>
And a sample of our bindings:
<bindings xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns="
http://java.sun.com/xml/ns/jaxb"
xmlns:jaxb="
http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="
http://java.sun.com/xml/ns/jaxb/xjc"
jaxb:extensionBindingPrefixes="xjc"
version="2.1">
<globalBindings fixedAttributeAsConstantProperty="true"
generateIsSetMethod="true" typesafeEnumBase="xsd:string">
<xjc:serializable uid="123456" />
<javaType name="java.lang.Boolean" xmlType="xsd:boolean" />
<javaType name="java.lang.Integer" xmlType="xsd:int" />
<javaType name="java.lang.Integer" xmlType="xsd:integer" />
<javaType name="java.lang.Long" xmlType="xsd:long" />
<javaType name="java.lang.Short" xmlType="xsd:short" />
<javaType name="java.lang.Double" xmlType="xsd:double" />
<javaType name="java.lang.Float" xmlType="xsd:float" />
<javaType name="java.lang.Byte" xmlType="xsd:byte" />
</globalBindings>
The same build, checked out on another box works perfectly, and just
by doing something as stupid as changing the a path value from "trunk"
to "trunc" for example "fixes" the problem ?!? The issue occured 5
times in the last 5 months and caused major mahem recently since it
occured on a official build :( Funny thing, other bindings seemed to
be taken into account, but not the isSet ...
Any ideas and/or solutions would be greatly appreciated.
Many thanks.
Patrick Sansoucy
In theory, there is no difference between theory and practice, but in
practice, there is ...