XJC: migrating ant task from JAXB to JDK 1.6 -


we have migrated java 1.6 , part of there re-write of ant tasks used older xjc ant task use executable: xjc.exe provided in java 1.6

we need retain older ant task parameters using commons-lang plugin generate tostring() methods in generated value objects.

earlier:

<target name="generate_vos" description="compile java source files">     <echo message="compiling schema..." />     <taskdef name="xjc" classname="com.sun.tools.xjc.xjctask">         <classpath refid="erpsimulator.classpath"/>     </taskdef>     <delete dir="${jaxb.src}" />     <mkdir dir="${jaxb.src}" />     <xjc schema="${jaxb.schema}/soapclientobjects.xsd" package="xxx.jaxb.vo" destdir="${jaxb.src}">         <arg value="-xcommons-lang" />         <arg value="-xcommons-lang:tostringstyle=simple_style" />         <produces dir="${jaxb.src}" includes="**/*.java" />     </xjc> </target> 

now:

 <target name="generate_vos" description="compile java source files">                <delete dir="${jaxb.src}" />         <mkdir dir="${jaxb.src}" />         <echo message="compiling schema..." />          <exec executable="xjc">              <arg value="-extension"/>              <arg value="-d"/>              <arg value="${jaxb.src}"/>              <arg value="-p"/>              <arg value="xxxx.jaxb.vo"/>              <arg value="${jaxb.schema}/soapclientobjects.xsd"/>                      <arg value="-xcommons-lang"/>              <arg value="-xcommons-lang:tostringstyle=simple_style" />          </exec> </target> 

however, running new task results in errors -xcommons* plugins not carried forward in version. have explicitly set plugin jar files commons-lang tostring plugin in path no luck.

any idea how make xjc.exe generate tostring() method resultant objects?

thanks!


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -