| 1815 |
mhunt |
1 |
<project name="xdoclet-macrodef">
|
|
|
2 |
|
|
|
3 |
<macrodef name="ant-ejbdoclet">
|
|
|
4 |
|
|
|
5 |
<attribute name="srcdir"/>
|
|
|
6 |
<attribute name="destdir" default = "${basedir}/build/generate"/>
|
| 4148 |
manwar |
7 |
<attribute name="ejbspec" default = "2.1"/>
|
|
|
8 |
<attribute name="jboss.version" default = "4.0"/>
|
| 1815 |
mhunt |
9 |
<attribute name="force" default = "${xdoclet.force}"/>
|
|
|
10 |
<attribute name="mergedir" default = "${basedir}/xdoclet"/>
|
|
|
11 |
|
|
|
12 |
<element name="xdoclet-classpath" optional="no" implicit="no" description="Anything you can put in a fileset."/>
|
|
|
13 |
|
|
|
14 |
<sequential>
|
|
|
15 |
|
|
|
16 |
<taskdef name = "ejbdoclet"
|
|
|
17 |
classname = "xdoclet.modules.ejb.EjbDocletTask">
|
|
|
18 |
<classpath>
|
| 6236 |
ashah1 |
19 |
<path id = "using.xdoclet.path">
|
|
|
20 |
<fileset dir="${PACKAGE_xdoclet}/jar" includes="*.jar" />
|
|
|
21 |
</path>
|
| 1815 |
mhunt |
22 |
<xdoclet-classpath/>
|
|
|
23 |
</classpath>
|
|
|
24 |
</taskdef>
|
|
|
25 |
|
| 6236 |
ashah1 |
26 |
<ejbdoclet destdir = "@{destdir}" excludedtags = "@version,@author" ejbspec = "@{ejbspec}" mergedir = "@{mergedir}" force = "@{force}">
|
| 1815 |
mhunt |
27 |
|
|
|
28 |
<fileset dir="@{srcdir}">
|
|
|
29 |
<!--</xdoclet-fileset>-->
|
|
|
30 |
<include name="**/*Bean.java"/>
|
|
|
31 |
</fileset>
|
|
|
32 |
|
|
|
33 |
<!-- Generate 'api' classes; these include:
|
|
|
34 |
* remote interfaces
|
|
|
35 |
* remote home interfaces
|
|
|
36 |
* value objects / data transfer objects (DTOs)
|
|
|
37 |
* entity primary key classes (for CMP)
|
|
|
38 |
-->
|
|
|
39 |
<remoteinterface pattern="{0}"
|
|
|
40 |
destdir="@{destdir}/api"/>
|
|
|
41 |
<homeinterface pattern="{0}Home"
|
| 4148 |
manwar |
42 |
destdir="@{destdir}/api"
|
|
|
43 |
templateFile="${using.ant-ejbdoclet.basedir}/home-custom.xdt"/>
|
| 1815 |
mhunt |
44 |
<valueobject pattern="{0}Details"
|
|
|
45 |
destdir="@{destdir}/api"
|
|
|
46 |
templateFile="${using.ant-ejbdoclet.basedir}/valueobject-custom.xdt"/>
|
|
|
47 |
<entitypk pattern="{0}Key"
|
|
|
48 |
destdir="@{destdir}/api"/>
|
|
|
49 |
|
|
|
50 |
<!-- Generate 'implementation' classes to be deployed on the server; these include:
|
|
|
51 |
* local interfaces
|
|
|
52 |
* local home interfaces
|
|
|
53 |
* utility broker objects (some of which will be transferred to the API)
|
|
|
54 |
* CMP entity beans
|
|
|
55 |
* BMP entity beans
|
|
|
56 |
* The deployment descriptor (both standard and JBoss-specific)
|
|
|
57 |
-->
|
|
|
58 |
<localinterface pattern="Local{0}"
|
|
|
59 |
destdir="@{destdir}/impl"/>
|
|
|
60 |
<localhomeinterface pattern="Local{0}Home"
|
| 4148 |
manwar |
61 |
destdir="@{destdir}/impl"
|
|
|
62 |
templateFile="${using.ant-ejbdoclet.basedir}/local-home-custom.xdt"/>
|
| 1815 |
mhunt |
63 |
<utilobject pattern="{0}Broker"
|
|
|
64 |
destdir="@{destdir}/impl"
|
|
|
65 |
cacheHomes="true"
|
|
|
66 |
templateFile="${using.ant-ejbdoclet.basedir}/lookup-custom.xdt"/>
|
|
|
67 |
<entitycmp destdir="@{destdir}/impl"/>
|
|
|
68 |
<entitybmp destdir="@{destdir}/impl"/>
|
|
|
69 |
<deploymentdescriptor destdir="@{destdir}/impl/META-INF"/>
|
|
|
70 |
<jboss version = "@{jboss.version}"
|
|
|
71 |
mergeDir = "@{mergedir}"
|
|
|
72 |
xmlencoding = "UTF-8"
|
|
|
73 |
destdir = "@{destdir}/impl/META-INF"
|
|
|
74 |
validateXml = "false"/>
|
|
|
75 |
</ejbdoclet>
|
|
|
76 |
|
|
|
77 |
<!-- Any brokers that act for remote EJBs should be in the API, so move them there -->
|
|
|
78 |
<move todir="@{destdir}/api">
|
|
|
79 |
<fileset dir="@{destdir}/impl" includes="**/*Broker.java">
|
|
|
80 |
<contains text="cachedRemoteHome" casesensitive="no"/>
|
|
|
81 |
</fileset>
|
|
|
82 |
</move>
|
|
|
83 |
|
|
|
84 |
</sequential>
|
|
|
85 |
</macrodef>
|
|
|
86 |
</project>
|