I'm using such a thing myself. Last week I wrote some templates for autogenerating some SOAP delegators for session facades. I created a <template/> and the template uses EjbIntf/Ejb/EjbHome namespaces.
So it works! Ara. > -----Original Message----- > From: Patrick Lightbody [mailto:[EMAIL PROTECTED]] > Sent: Sunday, February 24, 2002 12:09 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; xdoclet- > [EMAIL PROTECTED] > Subject: RE: [Xdoclet-devel] RE: [Xdoclet-user] <template> subtask > > Well, what you say doesn't seem to be what I've experienced. I'll play > with > it some more, but it could be screwed up. Has anyone actually used this? > > -Pat > > > >From: "Ara Abrahamian" <[EMAIL PROTECTED]> > >To: "'Patrick Lightbody'" <[EMAIL PROTECTED]>, > ><[EMAIL PROTECTED]>, <xdoclet- > [EMAIL PROTECTED]> > >Subject: RE: [Xdoclet-devel] RE: [Xdoclet-user] <template> subtask > >Date: Sat, 23 Feb 2002 23:29:52 +0330 > > > > > This makes me wonder though, what good is the <template/> task if it > >can't > > > access the namespaces such as <XdtEjb:>? Should there maybe be a > > > GenericEJBSubjectTask that works for the ant task <ejbtemplate>? I'd > >be > > > willing add this in to xdoclet if I were given CVS access. > > > >No doubt you can access XDtEjb:blabla or any other namespace from > ><temaplte/>, but only if you're using that template in context of > ><ejbdoclet/>. You can't expect it to work if you created a custom > >template and use it inside <webdoclet/> for example, or any other > >blabladoclet. All xdoclet subtasks derive form TemplateSubTask so they > >are all using <template/> really. > > > > > -Pat > > > >Ara. > > > > > >From: [EMAIL PROTECTED] (Andrew Stevens) > > > >Reply-To: [EMAIL PROTECTED] > > > >To: [EMAIL PROTECTED] > > > >Subject: RE: [Xdoclet-user] <template> subtask > > > >Date: Sat, 23 Feb 2002 11:27 +0000 (GMT Standard Time) > > > > > > > >A wise old hermit known only as Patrick Lightbody > ><[EMAIL PROTECTED]> > > > >once said: > > > > > > > > > I am using destinationfile and specifying a file. It isn't a > >problem > > > > > with file locations, I don't think. It seems that basically any > > > > > element, such as <XdtEjb:ejbName/doesn't work. It's as if the > >template > > > > > > subtask isn't finding the classes for all these tags (?). > > > > > > > > > > -Pat > > > > > > > >The <XDtXml:publicId/> and <XDtXml:systemId/> tags look up the > >relevant > > > >values from fields in the XmlSubTask, which extends TemplateSubTask. > >So, > > > >if you're just using <template/> to run it, it won't find them. > >However, > > > >it's *supposed* to print up a nice message saying you can only use > >them > > > >within an XML subtask - it checks for a ClassCastException when it > >does > > > >the > > > >XmlSubTask subTask = ( XmlSubTask ) > > > getDocletContext().getActiveSubTask(); > > > >Since it's not, pls raise a bug for it. > > > > > > > >Instead of using <template/>, try <xmltemplate/> (which uses the > > > >XmlSubTask instead of the TemplateSubTask). Then those <XDtXml:> > >tags > > > >should be okay. > > > > > > > >It's possible (though I haven't checked) that other tags have similar > > > >restrictions e.g. <XDtEjb:...> tags may assume you're using an > > > >AbstractEjbCodeGeneratorSubTask or > >AbstractEjbDeploymentDescriptorSubTask > > > >descendant (which extend TemplateSubTask and XmlSubTask > >respectively). > > > >However, if they do then they ought to also check for this IMO, so if > >it > > > >continues to bomb out rather than printing a polite message please > >raise > > > a > > > >bug. > > > > > > > >If you find any of the template tags you use do rely on it being a > > > >EJB-type subtask, then you can always use one of the standard EJB > > > subtasks > > > >with a custom templatefile. However, <ejbdoclet> only allows for one > > > each > > > >of the existing subtasks, so you'll have to use a second <ejbdoclet> > >task > > > >to run it. In this case, you may wish to raise a Feature Request for > > > >allowing multiple <deloymentdescriptor> etc. subtasks. > > > > > > > > > > > >Andrew. > > > > > > > > > >following > > > > > > > error (using Xdoclet 1.1.1): > > > > > > > > > > > > > > [ejbdoclet] Running <template/> > > > > > > > [ejbdoclet] Running XDoclet failed: > > > > > > > [ejbdoclet] <<>> > > > > > > > [ejbdoclet] 1 error > > > > > > > [ejbdoclet] 5 warnings > > > > > > > [ejbdoclet] javadoc: In doclet class > > > xdoclet.DocletTask$DocletMain, > > > > > > > method > > > > > > > start has thrown an exception > > > > > >java.lang.reflect.InvocationTargetException > > > > > > > > > > > > > > > > > > > > > BUILD FAILED > > > > > > > > > > > > > > Ara told me that the <template> task has a bunch of options, > >so > > > I'm > > > > > > > wondering what they are so that I can get this to work. A > >snipplet > > > > > > > of > > > > > >my > > > > > > > build.xml is: > > > > > > > > > > > > > > <deploymentdescriptor destdir="${deployment}/ejb/" /> > > > > > > > <orion destdir="${deployment}/ejb/" /> > > > > > > > <weblogic destdir="${deployment}/ejb/" > > > > > > > datasource="jdbc/DefaultDS" > > > > > >/> > > > > > > > <jboss destdir="${deployment}/ejb/" > > > > > > > typemapping="Oracle8" > > > > > >/> > > > > > > > <template > > > > > > > templatefile="${deployment}/template/pramati.j" > > > > > > > destinationfile="build/pramati-j2ee-server.xml" /> > > > > > > > </ejbdoclet> > > > > > > > > > > > > > > Any ideas? > > > > > > > > > > > >Look at the docs for <template/>. Docs/index.html->ejbdoclet- > > > >elements > > > > > >... common to all tasks. > > > > > > > > > > > >You should use destDir, and destinationFile is a file not a path. > > > Maybe > > > > > >that's the problem? > > > > > > > > > > > >Ara. > > > > > > > >_______________________________________________ > > > >Xdoclet-user mailing list > > > >[EMAIL PROTECTED] > > > >https://lists.sourceforge.net/lists/listinfo/xdoclet-user > > > > > > > > > > > > > > > _________________________________________________________________ > > > Join the world's largest e-mail service with MSN Hotmail. > > > http://www.hotmail.com > > > > > > > > > _______________________________________________ > > > Xdoclet-devel mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/xdoclet-devel > > > > > >_________________________________________________________ > >Do You Yahoo!? > >Get your free @yahoo.com address at http://mail.yahoo.com > > > > > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
