Subversion Repositories DevTools

Rev

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