Morning Antek,
2 things are incorrect or missing I think.
First, only declaring mockobjectdoclet is not enough, you have to enable the mockobjects sub task as well (look at the plugin jelly script):
maven.xdoclet.mockobjectdoclet.mockobjects.0=true
Second, the mockobjects task only works for abstract classes and interfaces. Your class is neither.
Perhaps that solves it. I remember posting an alternative to XDoclet mockobjects to the list. We are using a tool called MockCreator instead because it can mock plain classes as well. Perhaps you can find the post somewhere.
Leander
Antek Baranski schrieb:
Thanks for the answer. :)
let me put up some of my code cause I certainly can't see it. :(
------------------------------------------------------------- source code:
import javax.ejb.CreateException; import javax.ejb.EJBException; import javax.ejb.SessionBean; import javax.ejb.SessionContext;
/**
* Implementation of the LUP Service
* * @ejb:bean type="Stateless"
* name="LUPService"
* jndi-name="ejb/session/remote/LUPService"
* local-jndi-name="ejb/session/local/LUPService"
* display-name="LUP Service"
* view-type="remote"
*
* @mock:generate className="MockLUPServiceBean"
*
*/
public class LUPServiceBean implements SessionBean
---------------------------------------------------------------- maven.xml: <preGoal name="java:compile"> <attainGoal name="xdoclet:ejbdoclet"/> <attainGoal name="xdoclet:mockobjectdoclet"/> </preGoal>
------------------------------------------------------------------- project.properties: # ------------------------------------------------------------------- # E J B D O C L E T P R O P E R T I E S # ------------------------------------------------------------------- maven.xdoclet.ejbdoclet.session.0=false maven.xdoclet.ejbdoclet.utilobject.0=false
# ------------------------------------------------------------------- # M O C K O B J E C T D O C L E T P R O P E R T I E S # ------------------------------------------------------------------- maven.xdoclet.mockobjectdoclet.destDir=${maven.build.dir}/xdoclet/mockobjectdoclet maven.xdoclet.mockobjectdoclet.fileset.0=true maven.xdoclet.mockobjectdoclet.fileset.0.include=**/*.java
--------------------------------------------------------- project.xml: <dependency> <groupId>xdoclet</groupId> <artifactId>xdoclet-mockobjects-module</artifactId> <version>1.2.2</version> <type>jar</type> </dependency>
I've turned the xdoclet web site inside out and searched google and have come up empty. :(
regards,
Antek
On Wed, 19 Jan 2005 19:23:42 +0100, Antek Baranski <[EMAIL PROTECTED]> wrote:
Folks,
has anyone been able to get mockobjectdoclet running from the maven plugin for xdoclet? I've spent the last 2 days trying to get this to run but so far without any luck. :(
The weidest things is that in my project.properties I define: maven.xdoclet.mockobjectdoclet.destDir=${maven.build.dir}/xdoclet/mockobjectdoclet
and when I run this I get the following error message:
<ant:javac> srcdir "E:\apps\demo\lup-ejbgen\ejb\target\xdoclet\mockobjectdoclet does not exist! ----------------------------------- Can anyone explain to me why the mockobjectdoclet confuses my destdir definition for its srcdir?
thx,
Antek
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user