I'm ready to try to write plugin for EJB 3.0 annotations such as
@Entity, @Table, etc.
I tried to test out your Code Injector plugin but could not get xjc to
run. It didn't recognize the -Xinject-code argument.
I changed the com.sun.tools.xjc.Plugin file to read like this:
com.sun.tools.xjc.addon.locator.SourceLocationAddOn
com.sun.tools.xjc.addon.sync.SynchronizedMethodAddOn
com.sun.tools.xjc.addon.code_injector.PluginImpl
com.sun.tools.xjc.addon.code_injector.Const
And this is my ANT task:
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath>
<pathelement path="c:\sun\jaxb-ri-ea\lib\jaxb-xjc.jar"/>
<!--pathelement path="/path/to/plugin.jar" /-->
</classpath>
</taskdef>
<target name="xjc">
...
<xjc schema="${jaxb}\myschema2.xsd" target="${src}"
extension="true">
<arg value="-Xinject-code" />
</xjc>
...
</target>
I also wanted to add this declaration to my schema:
<xs:schema
xmlns:jaxb="
http://java.sun.com/xml/ns/jaxb"
xmlns:ci="
http://jaxb.dev.java.net/plugin/code-injector"
jaxb:version="2.0"
jaxb:extensionBindingPrefixes="ci">
but I already had this declared:
<xs:schema xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="
http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="
http://java.sun.com/xml/ns/jaxb/xjc"
jaxb:extensionBindingPrefixes="xjc"
jaxb:version="2.0">
how would I declare set both extensionBindingPrefixes xjc and ci?
_____
<< ella for Spam Control >> has removed 25091 Spam messages and set
aside 2 Newsletters for me
You can use it too - and it's FREE! www.ellaforspam.com