Convenient EAR Ant task based on the JAR task, that generates the application.xml taken from a set of 'EAR module' adapted FileSets, in addition to inserting the files them self.
| Attribute | Description | Required |
|---|---|---|
| destFile | The EAR file to create. | Yes |
| displayName | Display name to insert into the application.xml | Yes |
| smallIcon | If present, will part of an 'icon' element of the application.xml | No |
| largeIcon | If present, will part of an 'icon' element of the application.xml | No |
The nested metainf element specifies a FileSet, having Parameters like includes, excludes, etc. All files included in this fileset will end up in the META-INF directory of the EAR file.
The nested module element specifies a FileSet, having Parameters like includes, excludes, etc. In addition it specifies the type of the module. All files included in this fileset end up in the root directory of the EAR file and are added to the generated application.xml with the proper module xml tag. The module element accepts the follwoing set of parameters.
| Attribute | Description | Required |
|---|---|---|
| type | One of 'java', 'ejb', 'web' or 'connector'. Default is 'java' | Yes |
| context | Ignored for all other types than 'web'. Specifies the webapp name (context-root). If not defined, the base name of the WAR file(s) is used insted, prepended with '/' | No |
The nested securityRole element defines an (optional) 'security-role' element in the generated application.xml file. The securityRole element accepts the follwoing set of parameters.
| Attribute | Description | Required |
|---|---|---|
| role | A security role | Yes |
| description | A description for the role | No |
<eartask
destFile ="${dist.dir}/myApp.ear"
displayName ="The myApp EAR"
description ="Bla bla bla bla bla bla bla bla bla bla bla bla bla"
smallIcon ="myApp-16.gif"
largeIcon ="myApp-32.gif"
>
<metainf dir="${conf.dir}" includes="jboss-app.xml" />
<module type="web" dir="${build.dir}" includes="*.war" excludes="*-webapp.war" />
<module type="web" dir="${build.dir}" includes="foo-webapp.war" context="/foo" />
<module type="java" dir="${lib.dir}" includes="*.jar" excludes="*-ejb.jar" />
<module type="ejb" dir="${build.dir}" includes="*-ejb.jar" />
<module type="connector" dir="${build.dir}" includes="*.rar" />
<securityRole name="jBond" description="I. Flemming"/>
<securityRole name="jClark" description="T. Clancy"/>
</eartask>