Subversion Repositories DevTools

Rev

Rev 6229 | Details | Compare with Previous | Last modification | View Log | RSS feed

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