EdenEar
Description
Creates an ear file ready for deployment containing multiple post processors and route modules.
Accepts nested PostProcessor and RouteModule elements defined in the PostProcessor/RouteModule task definition. Nested FileSet(s) are used to put your components’ dependent libraries in the ear and make the nested PostProcessor/RouteModule elements aware of what libraries to reference.
When using EdenEar it must contain a nested FileSet referencing the current version of EdenCommon.jar. This jar file is necessary for your post processor(s) and route module(s) to work. See Above for further explanation.
When using EdenEar you must specify the location of UIS_java_lib using a property named “UIS_java_lib”.
For example:
<property name="UIS_java_lib" value="C:\java\projects\UIS_java_lib"/>
The ear file generated by this task is named using the applicationName and fromEnv attributes to generate and ear name like:
<applicationName>-<fromEnv>.ear
Parameters
Attribute |
Description |
Required |
applicationName |
The application name the post processors and route modules nested in this ear task will be used for. |
Yes. |
jarClasses |
If this option is selected the task will search for a “classes” and “bin” folder in the root folder of the ant project. If it finds either of these folders it will jar the contents of the folder under the name <appCode>Common.jar. Classes is searched for first and the task will stop looking after one folder is found. All nested post processors and route modules will automatically reference this jar, meaning if you select this option you can use any class from the current project from your business classes with no extra work involved. Valid values are “yes” and “no” |
No (defaults to “no”) |
fromEnv |
The environment the nested post processors and route modules are being deployed to. Note: This will set the fromEnv attribute for all nested post processors and route module regardless if those elements have defined the attribute. |
Yes. |
toEnv |
The environment the target EDEN deployment your applications post processors and route modules are communicating with. Note: This will set the toEnv attribute for all nested post processors and route module regardless if those elements have defined the attribute. |
Yes. |
appCode |
The application Code of your Application. This affects the jndi names of your deployed resources unless a specific jndi name is specified in those nested resources using the jndiName attribute, which isn’t recommended. See the PostProcessor/RouteModule task definition for more info. Note: This will set the appCode attribute in all nested PostProcessor/RouteModule elements. |
Yes. |
dist |
The location nested PostProcessor/RouteModule jar files will be saved before being bundled in the ear. Defaults to “dist”. This is useful if “dist” is already being used by ant within an existing build. |
No. |
temp |
The location of the temp directory the task uses to build jar files put into dist. |
No. (Defaults to “eden-build”) |
|
|
|
|
|
|
FileSet, PostProcessor, RouteModule
<fileset dir="C:\java\projects\UIS_java_lib" id="external.lib">
<include name="**/jdom-b8/lib/jdom.jar"/>
<include name="**/uisutilities-1.3/uisutilities.jar"/>
<include name="**/Eden-1.3/EdenCommon.jar"/>
<include name="**/commons-lang-1.0-b1.1/commons-lang-1.0-b1.1.jar"/>
</fileset>
<edenEar jarClasses="true"
applicationName="Sample Application"
fromEnv="dev"
toEnv="unt"
appCode="sa">
<fileset refid="external.lib"/>
<postProcessor name="postprocessor3"
businessClass="edu.iu.uis.eden.anttasks.postprocessors.TestPP"/>
</edenEar>
An ear named sa-dev.ear will be generated in the projects root folder.
A jar name saCommon.jar was generated from the content of the classes folder. These class are usable by all business classes defined in nested PostProcessor/RouteModule elements.
jdom.jar, uisutilities.jar, EdenCommon.jar, and commons-lang-1.0-b1.1.jar will be contained inside the ear and usable by all business class defined in nested PostProcessor/RouteModule elements
fromEnv, toEnv and appCode will be propagated to all nested PostProcessor/RouteModule elements. See PostProcessor/RouteModule task definition for further explanation.
<edenEar applicationName="Sample Application"
fromEnv="dev"
toEnv="unt"
appCode="sa"
dist="eardist">
<fileset file="custom.jar"/>
<fileset file="${UIS_java_lib}/Eden-1.3/EdenCommon.jar"/>
<postProcessor name="postprocessor3"
businessClass="edu.iu.uis.eden.anttasks.postprocessors.TestPP"/>
</edenEar>
Classes are not compiled, jared and placed in the ear automatically because jarClasses is not specified.
custom.jar is used in a nested fileset and therefore the contents within that jar will be accessible to the business classes defined in the nested PostProcessor/RouteModule tasks. Notice the user still included a reference to EdenCommon.jar. This is a must for correct installation of the ear.
The jar files containing the nested post processors and route modules will be placed in the folder eardist before being put into the ear.
Tags: creates an, description, ready, creates, deployment, edenear