aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Need Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Need "ant" JAXB-GEN generated classes to automatically "implements Serializable"" Watch "Need "ant" JAXB-GEN generated classes to automatically "implements Serializable"" New topic
Author

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

Santoshkumar Jeevan Pawar
Greenhorn

Joined: Aug 19, 2006
Posts: 27
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

Joined: Oct 27, 2005
Posts: 19697
    
  20

Moving to our Ant / build tools forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need "ant" JAXB-GEN generated classes to automatically "implements Serializable"