Just add appropriate xdoclet jars to your project.xml, for exmple:
<dependency>
<id>xdoclet:xdoclet</id>
<version>1.2b3-dev</version>
</dependency>
<dependency>
<id>xdoclet:xdoclet-bea-module</id>
<version>1.2b3-dev</version>
</dependency>
<dependency>
<id>xdoclet:xdoclet-ejb-module</id>
<version>1.2b3-dev</version>
</dependency>
<dependency>
<id>xdoclet+jmx-module</id>
<version>1.2b3-dev</version>
</dependency>
<dependency>
<id>xdoclet:xdoclet-mvcsoft-module</id>
<version>1.2b3-dev</version>
</dependency>
<dependency>
<id>xdoclet:xdoclet-web-module</id>
<version>1.2b3-dev</version>
</dependency>
<dependency>
<id>xdoclet:xdoclet-jboss-module</id>
<version>1.2b3-dev</version>
</dependency>
<dependency>
<id>xdoclet:xdoclet-xjavadoc</id>
<version>1.2b3-dev</version>
</dependency>

Then make sure in your taskdef for the ejbdoclet taks you are actually referencing these dependencies:
<taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask">
<classpath>
<path refid="maven.dependency.classpath"/>
</classpath>
</taskdef>

Now I don't know what you have defined for ${myclasspath}, since you don't show the definition in your example,, but my guess is that one way or another, you don't have everything in there needed for ejbdoclet (and this is not just the ejbdoclet task jar, obviously xjavadoc is needed as well, and any subtasks. The method above is an easy way to get them in...

Colin


Darren Hartford wrote:

Please correct me if this is not the right approach...
As I understand, the xdoclet plugin isn't exactly up-to-snuff, and the best approach is to use the ant/xdoclet tags within maven.xml under each goal, which is perfect for my existing projects being migrated from Ant to Maven anyhow.

Now, the problem I am having is the ever-so-common "taskdef class xdoclet.modules.ejb.EjbDocletTask cannot be found" error. I have gone through all the maven mailing list, Google, and my own trial-and-errors and have not been able to get anywhere.

I have removed ALL instances of xdoclet tags from my properties files, so the only place using xDoclet is maven.xml (assuming this is the correct approach) and the dependencies in project.xml. I have gotten my project to work with xdoclet using the plugins and property files, but is not suitable and need more fine-grain control available through the <goal> process.

Maven.xml
---------
<project xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:log="jelly:log"
>

<preGoal name="java:compile">
<attainGoal name="gen-ejbs"/>
</preGoal>

<goal name="gen-ejbs">
<property name="myclasspath" refid="maven.dependency.classpath"/>
<echo>classpath: ${myclasspath}</echo>
<taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpath="${myclasspath}"/>
<ejbdoclet
destdir="${output.java.gen-src.dir}"
ejbspec="2.0"
verbose="true">
....stuff....
--------

I have tried many variations on the classpath, classpathref, nested classpath, and have not had success. Dependency is listed in the project.xml file, the xdoclet-ejb-module-1.2b2.jar is there in the place specified in classpath and have verified the xdoclet.modules.ejb.EjbDocletTask class exists. Forgive me for sounding frustrated, but so close and just trying to get over this one hill....

maven 1.0 beta 8
xdoclet 1.2b2

thanks for any help in advance!
-D

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to