• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need "ant" JAXB-GEN generated classes to automatically "implements Serializable"

 
Santoshkumar Jeevan Pawar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have xsd like below:

<xs:element name="metroList">
<xs:complexType>
<xs:sequence>
<xs:element ref="clusterList" maxOccurs="1" minOccurs="1"/>
<xs:element ref="defaultThresholds" maxOccurs="1" minOccurs="1"/>
<xs:element ref="metroInfo" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="clusterList">
<xs:complexType>
<xs:sequence>
<xs:element ref="clusterInfo" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>

and i am generating classes with following ant script

<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="compile.classpath" />
<target name="jaxb-gen">
<xjc target="${generated}" schema="${src.xml}/metroList.xsd" removeOldOutput="yes"
package="com.metro">
<produces dir="${generated}/com/metro" includes="**/*" />
</xjc>
</target>


i want the generated classes to automatically "implements Serializable".

Your help will be really appreciated.

Thank You.
Have a Nice Time.

-Santosh
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Ant / build tools forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic