XDoclet FAQ From jGuru
Generated Feb 9, 2010 2:25:12 PM

Location: http://www.jguru.com/faq/XDoclet
Ownership: http://www.jguru.com/misc/user-agree.jsp#ownership.

What is the format of the @tags? Where should I put them in source code?
Location: http://www.jguru.com/faq/view.jsp?EID=735139
Created: Jan 25, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

You put @tags in javadoc comments of the program elements (method, class, field, etc). It follows the basic rules of javadoc comments, and a set of xdoclet-specific rules:

  • It starts with /** and ends with */. You can't start it with /* or //, xdoclet doesn't pick those comments.
  • It should be located right before the program element. For example:
    /**
     * This is an account bean.
     *
     * @ejb:bean name="bank/Account" type="CMP"
     * @author $Author: Ara $
     */
    public abstract class AccountBean implements EntityBean
    {
       /**
        * Deposit money.
        * @ejb:interface-method
        */
       public void deposit(float amount) {
          setBalance(getBalance()+amount);
       }
    }
    
    A common mistake is to put class comments in start of the file, not before the class definition.
  • All xdoclet @tags by default have a namespace identifier in front of them (@ejb: for example), the exception is @todo tag. The @namespace: is followed by the tag name.
  • Tags either have parameters in front of them or not. You should consult the documentation to see which @tags are available and with which parameters. Parameters are in either name="value" format each separated from the other with a white space character, or if the @tag supports at most one parameter by definition, you can abandon the parameter name and specify it like this: @ejb:interface-method "local" which is equal to @ejb:interface-method view-type="local".
  • If the @tag has a lot of parameters in front of it, it's recommended to split it into rows to make it more readable, like this:
    /**
    * @ejb:bean name="bank/Account"
    *           type="CMP"
    */
    
  • If you want to set a value for a tag parameter and the value has a " in it, you should escape it with a \, like this:
    /**
    * @ejb:bean name="the bean name is \"Account\""
    */
    
Comments and alternative answers

Getting Started using XDoclet for EJB development
Author: Darryl Thompson (http://www.jguru.com/guru/viewbio.jsp?EID=752464), Jul 23, 2002
Hello all, I am new to xdoclet but I am comfortable using Ant for builds/packaging of EJB archives (war, jar, ear). I currently create ejb production applications for both Weblogic and JBoss (2.44/3.0.0) and would like to use xdoclet to generate the xml deployment descriptors for either/or both app servers. We currenly use open source plug-ins (for Jbuilder 6 Enterprise) to generate most of the JBoss xml files and then manually modify them to work in an EJB 2.0 environment. I would like to replace this approach with an Ant/XDoclet alternative and to that end I have begun to "surf" around for an ejb tutorial (no luck yet, though there is a book scheduled to hit the market in August (Java Development with Ant) that is supposed to address this issue in detail), can anyone in JGuru-land point me in the right direction??? Thanks
Re: Getting Started using XDoclet for EJB development
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308), Jul 23, 2002
First, regarding the book "Java Development with Ant": it contains a detailed xdoclet chapter, and uses and covers XDoclet in many other chapters too. It's a fabulous book. Get it! But it doesn't cover EJB development with XDoclet in detail. So your best bet are the samples bundled with XDoclet. And for a very good tutorial read this excellent article: Onjava.com article. Or maybe this one: tutorial on XDoclet+JRun. More articles and tutorials are coming.

Ara.

How can I customize XDoclet to generate what I want?
Location: http://www.jguru.com/faq/view.jsp?EID=736016
Created: Jan 27, 2002 Modified: 2002-01-27 22:40:32.405
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

XDoclet is designed with extensibility in mind. You can modify the way it works in various ways:

  • You can set a modified template file as the template used by a sub-task. All the output is generated based on template files which have a .j extension and are based on XDoclet's own template engine. You can make a copy of the relevant template file, modify it, and make the sub-task use your copy of the template by the templateFile attribute available for all sub-tasks.
    Example: <remoteInterface templateFile="c:\mytemplates\myremote.j"/>
  • Many of the sub-tasks have some customization merge points in them. You can use these merge points to plug in your special piece of template into the standard templates.
    Example: Say you want to provide a toXml() method in all EJB data-object classes. By looking at dataobject's documentation you find out that it supports a customization merge point called dataobject-custom.j. So you create a dataobject-custom.j file, put it in the folder which is pointed to be mergeDir attribute of the subtask/task. dataobject will pick your merge files and merge it in. XDoclet assumes the content of that file is a template, so it parses it. This means you can write a templatelet (!) in it and use XDoclet's built-in template tags (such as <XDtPersistent:forAllPersistenceFields .../> to loop over all persistence fields and generate XML based on each field).
  • Let's say you want to add some stub generation facility to <entitycmp/> sub-task so that a SOAP stub is generated for the EJB. You can define a MyEntityCmpSubTask class derived from xdoclet's xdoclet.ejb.EntityCmpSubTask and override relevant methods (generateForClass for example). Then you should let XDoclet know about this customized <entitycmp/> sub-task. you do so by using the subTaskClassName attribute of the subtask. Remember the customized class should be in XDoclet's classpath.
    Example: <entitycmp subTaskClassName="com.foobar.MyEntityCmpSubTask"/>

Where can I find the list of supported @tags and sub-tasks?
Location: http://www.jguru.com/faq/view.jsp?EID=736017
Created: Jan 27, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

In your copy of XDoclet, open docs/index.html. The left hand side pane has various links to different parts of the documentation. XDoclet is itself just a framework, the concrete tasks are based on this frameowork. Two concrete tasks exist: <webdoclet/> and <ejbdoclet/>, the former serves as a container for web development sub-tasks (such as web.xml generation, taglib.tld generation, struts/webwork and so on) and the later is a container for EJB-releated sub-tasks (such as ejb-jar.xml generation, remote/local interface generation and so on). By clicking on the wedoclet or ejbdoclet links in left hand side pane you can see a list of supported subtasks for each of these two tasks and all of their @tags. By clicking on each sub-task or @tag you see the detailed description for each.
Comments and alternative answers

@weblogic.relation
Author: Peter Petrov (http://www.jguru.com/guru/viewbio.jsp?EID=470012), Sep 8, 2004
There is no documentation for this tag ( @weblogic.relation ). The documentation gives as an explanation "???". Where can I really find what tags I have in my particular distribution of XDoclet. And what attributes each one of them supports. I am using XDoclet 1.2.1. I am asking this because in some books and docs they say " @appserver.tag has the attributes A1,B1,C1 " and at the same time different docs, books say " @appserver.tag has the attributes A2,B2,C2 " They don't refer to concrete versions of XDoclet. So you got no idea who is talking about which version of XDoclet. So how could these contradictions be resolved ? Is digging into the XDoclet code the one and only option I have.

How can I create new @tags, templates and sub-tasks?
Location: http://www.jguru.com/faq/view.jsp?EID=736435
Created: Jan 28, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

You can easily create new @tags/templates/tasks/sub-tasks. We're enhancing it all the time so I'm not going to provide any details here. Refer to docs/architecture.html in the distribution for a detailed manual about it.

  • You can use <template/> and <xmlTemplate/> subtasks. These sub-tasks are supported in all tasks automatically (webdoclet/ejbdoclet and even yourdoclet). The former is for any kind of output, the later has some facilities for XML output generation (automatic validation of generated content for example).
    Example: <template templateFile="c:\mytemplate.j" destDir="c:\output" destinationFile="report.html"/>
    Refer to the documentation for deatils of each of the above sub-tasks, you'll find a lot of options available.
  • You can create your own task or sub-task by simply deriving from xdoclet.DocletTask and xdoclet.SubTask (or one of its sub-classes, TemplateSubTask, XmlSubTask or a more specialized one such as WebDotXmlSubTask). Use Ant's <taskDef/> facility to install the task. Use subTaskClassName attribute of all sub-tasks to install the subtask.

What are the merge points? What are they for?
Location: http://www.jguru.com/faq/view.jsp?EID=736437
Created: Jan 28, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

Merge points (or merge files) are a mechanism XDoclet provides for merging in a user-written file with the template file. It has various uses:

  • Not all class libraries out there use XDoclet @tags. You should be able to add Struts' servlet for example to the web application you're working on using XDoclet. So <deploymentDescriptor/> sub-task of <webdoclet/> (in fact the web_xml.j tempalte file, which is used by <deploymentDescriptor/>) provides a servlets.xml merge points. So you can create a file named servlets.xml and specifiy all not-XDoclet-annotated servlets in it.
  • Putting @tags in code is good for development but sometimes you want to do deployment to various servers for example. Should you modify the @tags each time for each deployment? No, for deployment-oriented activities (for example specifying the table name an EJB maps to) it's better to use merge-points and use different copies of the merge point for different deployments.
  • Merge points provides pluggability. You can use customization merge points to add a customized content to the generated stuff.
Comments and alternative answers

More information
Author: Mathias Bogaert (http://www.jguru.com/guru/viewbio.jsp?EID=202039), Feb 4, 2002
For more information, check http://xdoclet.sourceforge.net/merge.html.
I've tried a lot of combinations but I still haven't figured out how to have XDoclet to merge a ejb-ejbrefs-MyBean.xml file.
Author: Luis Soeiro (http://www.jguru.com/guru/viewbio.jsp?EID=447389), Apr 16, 2002
Hello

I'm using win2k with jdk 1.3 and ant 1.4.1. Combining Ant with Xdoclet is nice way of automating EJB development. However, I'm having trouble with ejb-refs. I was trying to solve it by using a merge file, ejg-ejbrefs-MyBean.xml, but I just can't get Xdoclet to use it! I've tried using backslashes and forward slashes within the path. I've also tried to put the file in all sorts of locations within the project.

Where should it exactly be put?

What is the mergedir string that should be used?

Could somebody datail a little more the given example?

Thanks,

Luis Fernando Soeiro

Re: I've tried a lot of combinations but I still haven't figured out how to have XDoclet to merge a ejb-ejbrefs-MyBean.xml file.
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308), Apr 20, 2002
Luis, first you need to let xdoclet know where merge files are placed. That's what mergedir attribute does. Place your marge files there. Specifically you should place ejb-ejbrefs-MyBean.xml *along with MyBean's package directory structure under that mergedir folder. For example: c:/mymergedir/com/foo/ejb-ejbrefs-MyBean.xml. IIRC there's a bug in v1.1.2 that makes you put the file in com/foo/interfaces folder (the folder defined in global <packagesubstitution/> of <ejbdoclet/>). It's fixed in cvs.

Ara.

Similar problem - can't merge Struts servlet definitions into web.xml
Author: Mira Kes (http://www.jguru.com/guru/viewbio.jsp?EID=1065047), Mar 11, 2003
I'm using XDcolet v1.2b and I cannot figure out why it doesn't merge servlets.xml and servlet-mappings.xml into web.xml. The webdoclet definition looks like:
		<webdoclet	destdir="${build.generate.dir}"
					mergedir="${src.merge.dir}/web"
					force="${xdoclet.force}">

			<fileset dir="${src.main.dir}">
				<include name="**/web/**/*Servlet.java" />
				<include name="**/web/**/*Filter.java" />
				<include name="**/web/**/*Listener.java" />
				<include name="**/web/**/*Action.java" />
				<include name="**/web/**/*Tag.java" />
			</fileset>

			<deploymentdescriptor	destdir="${build.war.dir}/WEB-INF"
									servletspec="2.3">
									
				<taglib	uri="/WEB-INF/struts-bean.tld"
						location="/WEB-INF/struts-bean.tld"/>
				<taglib	uri="/WEB-INF/struts-html.tld"
						location="/WEB-INF/struts-html.tld"/>
				<taglib	uri="/WEB-INF/struts-logic.tld"
						location="/WEB-INF/struts-logic.tld"/>
			</deploymentdescriptor>
			
			<jbosswebxml	version="${jboss.version}" 
							destdir="${build.war.dir}/WEB-INF"/>
		</webdoclet>

... and the servlets.xml and servlet-mappings.xml files are in the "${src.merge.dir}/web" directory. The resulting web.xml contains the taglib references, listener declaration but nothing from those merge files.

Any idea what could be wrong?

Thanks

Mira
merge points in Xdoclet
Author: nirmish dholakia (http://www.jguru.com/guru/viewbio.jsp?EID=1159924), Apr 3, 2004
I have two finder methods in my bean. now i want to add another finder method. so. i add a merge point to ejbdoclet task and it generated corresponding finder method in "ejb-jar" file. but it can reflect the changes in the home interface so. what should i do? pls give me the solution.. thanks in advance nirmish.

Is it possible to use XDoclet without Ant?
Location: http://www.jguru.com/faq/view.jsp?EID=736438
Created: Jan 28, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

It's not possible to use XDoclet without Ant, for some good reasons. But anyway you should be able to invoke Ant from make for example.

Obviously it's ridiculous to add @tags to source code for one-time operations where you generate something from the @tags and never come back to use the @tag again. So @tags are good for cases where you run something continuously, for cases where the code changes and the generated stuff should be regenerated based on the new code/@tags. Ant is a great tool for automating this procedure, it's a great tool for "Continuous Integration".

Comments and alternative answers

XDoclete directory
Author: pasi shemeikka (http://www.jguru.com/guru/viewbio.jsp?EID=962677), Jul 24, 2002
Is XDoclet bundle to be extracted into ant directory or where excatly, I'm newbie related to XCoclet issues, Appriciate you effort of replying :)

I don't like the code convention XDoclet uses for generating code. How can I change it?
Location: http://www.jguru.com/faq/view.jsp?EID=736442
Created: Jan 28, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

XDoclet does not have any mechanism to apply a specified code convention, built-in. It's really out of the scope of this tool. All templates use a single coding convention, which might not be what you like. You can pipe the generated code to another tool for code beautification. Such a code beautifier which is sued in XDoclet's own development is PrettyPrinter module of jRefactory. It has an Ant task which smartly checks file timestamps and even has CVS modification check in it, and beautifies the files if the have been modified since last run. Here is an example of its use:

<target name="beautify" depends="prepare">

   <taskdef name="pretty" classname="org.acm.seguin.ant.Pretty" classpath="${basedir}/../lib/prettyprinter.jar"/>

   <pretty settingsDir="${basedir}/../config" cvs="true" compileDir="${build.dir}/classes">
      <fileset dir="${src.dir}">
         <include name="**/*.java" />
      </fileset>
   </pretty>

</target>
Comments and alternative answers

Another cool code style tool
Author: Mathias Bogaert (http://www.jguru.com/guru/viewbio.jsp?EID=202039), Feb 4, 2002
http://astyle.sourceforge.net/

I know XDoclet has various @tags for various EJB containers. Does that mean my application will run on all application servers?
Location: http://www.jguru.com/faq/view.jsp?EID=736444
Created: Jan 28, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

No, XDoclet can't do any magic :-)

But at least it can make it a lot easier. There's built-in support for various application servers, so you can create deployment descriptors of each application server using XDoclet easily. For example to support jBoss there's a @jboss:blabal set of @tags, same is true for @weblogic:blabl, @orion:blabla, @websphere:blabla and so on. What you can do is to add these vendor-specific @tags to your source and generate deployment descriptors for each of the application servers you like. For example say you want to deploy CMP beans to both Orion and jboss. You define the database mapping by putting @tags of both @orion and @jboss for CMP beans. Here is how you define the mapping for a persistence field:

/**
 * @weblogic:dbms-column "name"
 * @orion:persistence persistence-name="name" sql-type="VARCHAR"
 */
 public abstract String getName();

Each application server supports different options and settings but using XDoclet you have a neat way of supporting each by simply maintaining them in the same source code.
 

All of the EJB samples XDoclet provides are for EJB 2.0. Is it possible to write EJB 1.1 applications using XDoclet?
Location: http://www.jguru.com/faq/view.jsp?EID=736447
Created: Jan 28, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

Definitely. Set ejbSpec="1.1" in <ejbdoclet/> but follow the rules of EJB 2.0 in source code. This means instead of defining persistent fields as normal attributes (the way EJB 1.1 is), follow the abstract schema rules of EJB 2.0 like this:

/**
* @ejb:persistent-field
*/
public abstract String getName();
public abstract void setName(String name);

And remember you should define your CMP bean abstract and activate the <entitycmp/> sub-task of <ejbdoclet/>. <entitycmp/> generates a sub-class which is understandable by a EJB 1.1 container.

It's also worth to mention that XDoclet generates deployment descriptors which are spec version compliant (DTD points to correct version, elements and attributes have version specific details in mind, and so on).

<ejbdoclet/> has <entitycmp/>/<entitybmp/>/<session/> sub-tasks. What are they for? Why is a sub-class generated from my EJB?
Location: http://www.jguru.com/faq/view.jsp?EID=736448
Created: Jan 28, 2002
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

They provide some services for you:

  • <entitycmp/> if ejbSpec="1.1" generates a EJB 1.1-based CMP bean from your EJB 2.0-based abstract CMP schema and provides a optimistic locking scheme for you by putting and auto-updating a version field. For 1.1 it also does the modification/dirty check so the ejbStore is called only when something has changed. For both spec version it handles data-object generation automatically for you, so you should activate it if you want to use <dataobject/>.
  • <entitybmp/> does all the optimistic-locking/dirty-flag/etc plus it calls the DAO class automatically.

<entitycmp/>/<entitybmp/> and <session/> all try to also generate as much as possible labor intensive code you normally write. For example you should remember to put a no-argument ejbCreate method in your stateless session bean or define a no-op ejbActivate and so on. These tasks try to do that for you automatically, so you just concentrate on the business logic. It also results in source code which is more readable because there's no empty ejbActivate/etc or void stuff like that in it, all is hidden in the sub-class.

Comments and alternative answers

How do I run the <entitybmp/> task only on some EJB:s?
Author: Jonas Bergqvist (http://www.jguru.com/guru/viewbio.jsp?EID=81465), Apr 23, 2002
How do I run the <entitybmp/> task only on some EJB:s while still having all of them end up in the same deployment descriptor?

I could of course execute <ejbdoclet.../> several times within a target, but then I will end up with two DD:s...

Say I have FirstBean.java and SecondBean.java. I want to runt <entitybmp/> on FirstBean but not on SecondBean. I have tried putting a fileset in the <entitybmp/> (desperate move) but this does not seem to be valid. I haven't found an @-tag to put in the bean java file to avoid this creation. Am I missing something here?

I would very much appreciate an answer to this question.

Regards,

Jonas Bergqvist
Re: How do I run the <entitybmp/> task only on some EJB:s?
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308), Apr 23, 2002
Well, first why you need such a thing? We don't support it because no one came and said "I need to exclude some of my beans from entitybmp list". So it's not possible right now. Please add a feature request (http://sourceforge.net/tracker/?atid=402707&group_id=31602&func=browse). We'll implement it according to our priorities.

Anyway as a workaround you can use your customized version of entitybmp.j and include/exclude the generated stuff case by case. This way the subclass is generated but it doesn't contain the whole stuff normally is there, it's empty. But if you're serious and in hurry you can implement it yourself, xdoclet.ejb.EntityBmpSubTask.matchesGenerationRules() and check for ejb:bean generate-bmp-subclass="false".

Ara.

Re[2]: How do I run the <entitybmp/> task only on some EJB:s?
Author: Jonas Bergqvist (http://www.jguru.com/guru/viewbio.jsp?EID=81465), Apr 23, 2002
Thanks for your reply, Ara!

Well, yes, I didn't think I would need such a thing but we have developed a bean B which extends one of our other beans A. Due to some settings in A, B:s BMP class turned out uncompileable while the original Bean class worked just fine. We are working on solving this issue, but for the time beeing I need to exclude it from generating the BMP class and wanted to see if I could do it in an easy manner.

Thanks for your advice!

Regards,

Jonas

I'm getting lots of javadoc warning messages in console when I run XDoclet. What's the problem? Can I avoid it?
Location: http://www.jguru.com/faq/view.jsp?EID=757724
Created: Feb 13, 2002 Modified: 2002-02-14 06:49:29.971
Author: Ara Abrahamian (http://www.jguru.com/guru/viewbio.jsp?EID=718308)

You can safely ignore these warning messages.

Your code refers to a class that Javadoc can't find. Javadoc always complains about this, but it doesn't stop XDoclet from doing its job. It's a normal behavior from javadoc, because the bean you're running XDoclet on is refering to a class which is not yet generated by XDoclet but anyway javadoc tries to load it and it can't because it's not yet generated.

Unfortunately you can't get rid of these messages effectively. A later version of XDoclet will solve this issue by introducing its own doclet API.

PS: Note that the format of these warning messages vary in different versions of JDK. JDK 1.3 outputs "javadoc: warning - Cannot find class" while JDK 1.4 writes "cannot resolve symbol" in front of [ejbdoclet].

Comments and alternative answers

But it stops the script...
Author: Emerson Cargnin (http://www.jguru.com/guru/viewbio.jsp?EID=851345), Apr 28, 2002
I get 12 warnings and 3 errors, but i can't distinguish the errors from warnings. And if I add the generated path to
the source path as in sourcepath="${java.dir};${generated.java.dir}"
It doesn't stops... please someone could help me??? here goes the console output : Buildfile: build.xml init: prepare: [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\ejb [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\ejb\META-INF [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\web [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\web\WEB-INF [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\web\WEB-INF\tl ds [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\web\WEB-INF\cl asses [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\j2ee [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\j2ee\META-INF [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\gen-src [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\gen-src\java [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\ejb\classes [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\ejb\generic-ej b [mkdir] Created dir: C:\temp\eclipse\workspace\Cobranca\build\ejb\orion-ejb ejbdoclet: [ejbdoclet] Generating Javadoc [ejbdoclet] Javadoc execution [ejbdoclet] Loading source file C:\temp\eclipse\workspace\Cobranca\src\br\com\si credi\cadastro\servidor\ejb\BancoEJB.java... [ejbdoclet] Loading source file C:\temp\eclipse\workspace\Cobranca\src\br\com\si credi\cadastro\servidor\ejb\CadastroFacadeEJB.java... [ejbdoclet] Loading source file C:\temp\eclipse\workspace\Cobranca\src\br\com\si credi\cadastro\servidor\ejb\MunicipioEJB.java... [ejbdoclet] Loading source file C:\temp\eclipse\workspace\Cobranca\src\br\com\si credi\cadastro\servidor\ejb\UFEJB.java... [ejbdoclet] Loading source file C:\temp\eclipse\workspace\Cobranca\src\br\com\si credi\cobranca\servidor\ejb\CobrancaFacadeEJB.java... [ejbdoclet] Loading source file C:\temp\eclipse\workspace\Cobranca\src\br\com\si credi\cobranca\servidor\ejb\PracaEJB.java... [ejbdoclet] Constructing Javadoc information... [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cadastro\servi dor\ejb\MunicipioEJB.java:128: cannot resolve symbol [ejbdoclet] symbol : class UFLocal [ejbdoclet] location: class br.com.sicredi.cadastro.servidor.ejb.MunicipioEJB [ejbdoclet] public abstract UFLocal getUF(); [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cadastro\servi dor\ejb\MunicipioEJB.java:134: cannot resolve symbol [ejbdoclet] symbol : class UFLocal [ejbdoclet] location: class br.com.sicredi.cadastro.servidor.ejb.MunicipioEJB [ejbdoclet] public abstract void setUF(UFLocal newUF); [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\CobrancaFacadeEJB.java:10: cannot resolve symbol [ejbdoclet] symbol : class BancoLocal [ejbdoclet] location: package ejb [ejbdoclet] import br.com.sicredi.cadastro.servidor.ejb.BancoLocal; [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\CobrancaFacadeEJB.java:12: cannot resolve symbol [ejbdoclet] symbol : class MunicipioLocal [ejbdoclet] location: package ejb [ejbdoclet] import br.com.sicredi.cadastro.servidor.ejb.MunicipioLocal; [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\CobrancaFacadeEJB.java:13: cannot resolve symbol [ejbdoclet] symbol : class UFLocal [ejbdoclet] location: package ejb [ejbdoclet] import br.com.sicredi.cadastro.servidor.ejb.UFLocal; [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\PracaEJB.java:7: cannot resolve symbol [ejbdoclet] symbol : class BancoLocal [ejbdoclet] location: package ejb [ejbdoclet] import br.com.sicredi.cadastro.servidor.ejb.BancoLocal; [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\PracaEJB.java:8: cannot resolve symbol [ejbdoclet] symbol : class MunicipioLocal [ejbdoclet] location: package ejb [ejbdoclet] import br.com.sicredi.cadastro.servidor.ejb.MunicipioLocal; [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\PracaEJB.java:166: cannot resolve symbol [ejbdoclet] symbol : class BancoLocal [ejbdoclet] location: class br.com.sicredi.cobranca.servidor.ejb.PracaEJB [ejbdoclet] public abstract BancoLocal getBanco(); [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\PracaEJB.java:173: cannot resolve symbol [ejbdoclet] symbol : class BancoLocal [ejbdoclet] location: class br.com.sicredi.cobranca.servidor.ejb.PracaEJB [ejbdoclet] public abstract void setBanco(BancoLocal newBanco); [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\PracaEJB.java:182: cannot resolve symbol [ejbdoclet] symbol : class MunicipioLocal [ejbdoclet] location: class br.com.sicredi.cobranca.servidor.ejb.PracaEJB [ejbdoclet] public abstract MunicipioLocal getMunicipio(); [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\PracaEJB.java:188: cannot resolve symbol [ejbdoclet] symbol : class MunicipioLocal [ejbdoclet] location: class br.com.sicredi.cobranca.servidor.ejb.PracaEJB [ejbdoclet] public abstract void setMunicipio(MunicipioLocal newMunicipio); [ejbdoclet] ^ [ejbdoclet] Running <homeInterface/> [ejbdoclet] Generating Home interface for 'br.com.sicredi.cadastro.servidor.ej b.CadastroFacadeEJB'. [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cadastro\servi dor\ejb\CadastroEJBGetter.java:10: cannot resolve symbol [ejbdoclet] symbol : class BancoLocalHome [ejbdoclet] location: class br.com.sicredi.cadastro.servidor.ejb.CadastroEJBGett er [ejbdoclet] public static BancoLocalHome getBancoHome() throws NamingException { [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cadastro\servi dor\ejb\CadastroEJBGetter.java:16: cannot resolve symbol [ejbdoclet] symbol : class UFLocalHome [ejbdoclet] location: class br.com.sicredi.cadastro.servidor.ejb.CadastroEJBGett er [ejbdoclet] public static UFLocalHome getUFHome() throws NamingException { [ejbdoclet] ^ [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cadastro\servi dor\ejb\CadastroEJBGetter.java:22: cannot resolve symbol [ejbdoclet] symbol : class MunicipioLocalHome [ejbdoclet] location: class br.com.sicredi.cadastro.servidor.ejb.CadastroEJBGett er [ejbdoclet] public static MunicipioLocalHome getMunicipioHome() throws NamingE xception { [ejbdoclet] ^ [ejbdoclet] Generating Home interface for 'br.com.sicredi.cobranca.servidor.ej b.CobrancaFacadeEJB'. [ejbdoclet] C:\temp\eclipse\workspace\Cobranca\src\br\com\sicredi\cobranca\servi dor\ejb\CobrancaEJBGetter.java:9: cannot resolve symbol [ejbdoclet] symbol : class PracaLocalHome [ejbdoclet] location: class br.com.sicredi.cobranca.servidor.ejb.CobrancaEJBGett er [ejbdoclet] public static PracaLocalHome getPracaHome() throws NamingException { [ejbdoclet] ^ [ejbdoclet] Running <localHomeInterface/> [ejbdoclet] Generating Local Home interface for 'br.com.sicredi.cadastro.servi dor.ejb.BancoEJB'. [ejbdoclet] Generating Local Home interface for 'br.com.sicredi.cadastro.servi dor.ejb.MunicipioEJB'. [ejbdoclet] Generating Local Home interface for 'br.com.sicredi.cadastro.servi dor.ejb.UFEJB'. [ejbdoclet] Generating Local Home interface for 'br.com.sicredi.cobranca.servi dor.ejb.PracaEJB'. [ejbdoclet] Running <remoteInterface/> [ejbdoclet] Generating Remote interface for 'br.com.sicredi.cadastro.servidor. ejb.CadastroFacadeEJB'. [ejbdoclet] Generating Remote interface for 'br.com.sicredi.cobranca.servidor. ejb.CobrancaFacadeEJB'. [ejbdoclet] Running <localInterface/> [ejbdoclet] Generating Local interface for 'br.com.sicredi.cadastro.servidor.e jb.BancoEJB'. [ejbdoclet] Generating Local interface for 'br.com.sicredi.cadastro.servidor.e jb.MunicipioEJB'. [ejbdoclet] Generating Local interface for 'br.com.sicredi.cadastro.servidor.e jb.UFEJB'. [ejbdoclet] Generating Local interface for 'br.com.sicredi.cobranca.servidor.e jb.PracaEJB'. [ejbdoclet] Running <deploymentDescriptor/> [ejbdoclet] Generating EJB deployment descriptor. [ejbdoclet] 3 errors [ejbdoclet] 12 warnings BUILD FAILED
Re: But it stops the script...
Author: tommy g (http://www.jguru.com/guru/viewbio.jsp?EID=1072227), Apr 1, 2003
1st note: Core:

- *** Because of changes to the JDK1.4 javadoc (increased strictness with unknown tags and using ':' to delimit the -tag option), XDoclet now supports class and method-level tags of the form "@namespace.tag" in addition to the existing "@namespace:tag". If you're using XDoclet under JDK1.4, we recommend you use this new form for your tags if you don't want lots of warnings when you build your javadocs. ***

2nd note: this is how you set it up.
<target name="javadoc" > <javadoc sourcepath="${base}/src" destdir="${base}/docs/api" packagenames="nl.virgil.yards.*" classpathref="yards.classpath" access="private"> <tag name="jboss" scope="all" description=" "/> <tag name="ejb.home" scope="all" description=" "/> <tag name="ejb.bean" scope="all" description=" "/> <tag name="ejb. interface-method" scope="all" description=" "/> </javadoc>

Re: But it stops the script...
Author: Jeff Gager (http://www.jguru.com/guru/viewbio.jsp?EID=1091060), Jun 4, 2003
I had the same problem and solved it with the following bodge; <ejbdoclet sourcepath="empty" destdir="${generate.path}" excludedtags="@version,@author" ejbspec="${ejb.version}" force="${xdoclet.force}"> <fileset dir="${src.path}"> <include name="**/*EJB.java"/> </fileset> </ejbdoclet> Where 'empty' is an empty sub directory of my project. The problem is that you are forced to define the source path twice (in the sourcepath attribute and in the fileset element) but you can't filter the sourcepath. I would be amazed if there was not a much better way of getting over this silly problem.