IMHO the best solution is to put jaxb generation target before ejbdoclet target. Is it possible? Otherwise create your subtask and invoke it yourself, probably derive it from DataObjectSubTask, override some of the methods and do jaxb generation there. You should also disable original dataobject subtask and use your own one, so remove <dataobject/> and add your <template templateFile="mydataobject.j" ..../>, because you derived from DataObjectSubTask and getSubTaskName() return "<dataobject/>" then your subtask is automatically recognized (I hope!) by the rest of ejbdoclet (I mean in some cases other subtasks check whether <dataobject/> was used or not). Also I want to inform you that atm I'm working on extending TemplateSubTask so you'll be able to specify the subtask name very easily like this:
<template templateFile="mydataobject.j" subTaskClass="com.my.jaxb.DataObjSubTask" ..../> Hopefully I'll commit it tonight. Ara. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:xdoclet-user- > [EMAIL PROTECTED]] On Behalf Of Tim Kuntz > Sent: Saturday, January 19, 2002 3:19 AM > To: [EMAIL PROTECTED] > Subject: [Xdoclet-user] Looking for Suggestions with JAXB problem > > I have only been working with XDoclet for a few days and have run into a > problem that I am looking for "best solution" suggestions on. > > I am using the early-access Java Architecture for XML Binding (JAXB) to > handle all XML parsing and generation. JAXB has its own source generation > classes that accept a DTD and a JAXB specific binding schema and generate > "xml-aware" objects. > > So far I have created a custom dataobject.j template which allows the Data > object to extend the JAXB generated Data object. I have also created > templates which generate the DTD and Binding Schema mentioned above. This > all works great thanks to XDoclet's extensibility. > > My problem is that I need to invoke the JAXB class that will generate the > source for the JAXB object and I want to do that for each class that I am > processing in my EjbDoclet task. I need to be able to dynamically set the > names of the input files (DTD/Binding Schema) and the ouptut file (JAXB > object). > > Do I create a new TemplateSubTask? Or maybe since my Data object will > always > need to extend the JAXB object, should I modify DataObjectSubTask to > include > additional parameters? Is it a really bad idea to invoke the JAXB source > generation during an XDoclet task? I know that I don't want to do my own > JAXB object generation. <g> > > Thanks in advance for any help. > > Tim Kuntz > > _________________________________________________________________ > Get your FREE download of MSN Explorer at > http://explorer.msn.com/intl.asp. > > > _______________________________________________ > Xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
