XDoclet为什麽不能生成接口文件?

04-03-27 lyojbuilder
大家好:

不知道这里有没有用XDoclet的,我想用他生成home和Remote接口文件,按照例子上说的,但是不行!我的代码:

Build.xml

<project name="lyoejb" default="build">
<property name="src" location="src"/>
<property name="generated" location="generated"/>
<property name="ejb.path" value="lib/j2ee.jar"/>
<property name="name" value="LyoEJB"/>
<target name="init">
<mkdir dir="build"/>
</target>
<target name="ejbdoclet" depends="init">
<taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask">
<classpath>
<fileset dir="lib" includes="*.jar"/>
</classpath>
</taskdef>
<ejbdoclet destdir="generated" ejbspec="2.0">
<fileset dir=".">
<include name="**/*Bean.java"/>
</fileset>
<remoteinterface pattern="{0}Remote"/>
<homeinterface/>

<deploymentdescriptor destdir="build/ejb/META-INF"/>
<weblogic xmlencoding="UTF-8" destdir="build/ejb/META-INF" validatexml="true"/>

</ejbdoclet>
</target>
</project>
<p>

EJB code :

package lyo.hotmail;
import javax.ejb.*;
/*
*@ejb.bean type="Stateful"
* name="LogonSBean"
* view-type="both"
*/
public class LogonSessionBean implements SessionBean
{
public String name=null;
SessionContext cs=null;
public void setSessionContext(SessionContext sc){}

//public void create(){}
public void ejbCreate(){}
public void ejbLoad(){}
public void ejbStore(){}
public void ejbActivate(){}
public void ejbPassivate(){}
/*
*@ejb.interface-method 
*/
public void setName(String name){
this.name=name;
}
/*
*@ejb.interface-method
*/
public String getName(){
return this.name;
}
} 
<p>

When I run the build.xml it output:

Buildfile: build.xml

init:

ejbdoclet:
<p>[ejbdoclet] Deploy TEMPLATE URL: jar:file:F:\test\ejb\lib\xdoclet-apache-module
-1.2.jar!/xdoclet/modules/apache/axis/ejb/resources/axis-deploy_wsdd.xdt
<p>[ejbdoclet] Undeploy TEMPLATE URL: jar:file:F:\test\ejb\lib\xdoclet-apache-modu
le-1.2.jar!/xdoclet/modules/apache/axis/ejb/resources/axis-undeploy_wsdd.xdt
<p>[ejbdoclet] - Running <remoteinterface/>
<p>[ejbdoclet] - Running <homeinterface/>
<p>[ejbdoclet] - Running <deploymentdescriptor/>
<p>[ejbdoclet] - Running <weblogic/>

compile:

build:

BUILD SUCCESSFUL
Total time: 6 seconds 
<p>

没有错误,但是根本没有生成home和remote代码,哪里错了,请指点!

lyojbuilder
2004-03-29 10:58
没人用过Xdoclet?

happlyin
2004-03-29 11:33
试试把<taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask">

中的classname改为

xdoclet.ejb.EjbDocletTask

可能是xdoclet的版本问题吧

lyojbuilder
2004-03-30 19:33
多谢回复

就是说你认为我的代码和build文件写得没问题。

我把他换成“xdoclet.ejb.EjbDocletTask”后,还是不行!什麽接口文件也没有生成,我把我的xdoclet换成1.1,1.0都不行?到底是哪里错了?

lyojbuilder
2004-03-31 13:17
提前 :(

猜你喜欢
3Go 1 2 3 下一页