Hi,
Yes it is possible to automate the process of creating an EAR, using
ant script. (The EAR created by this way can be deployed in any app server).
Below provided is a sample ant target in the build_abc.xml for crating an EAR.
< target if="module.ear" name="ear" depends="prepare">
< ear earfile="${target_ejb.dir}/myapp.ear" appxml="${source.dir}/meta-inf/application.xml">
< fileset dir="${target_ejb.dir}">
< include name="ejb_${product.name}_abc.jar"/>
< include name="ejb_${product.name}_xyz.jar"/>
< include name="abc.war"/>
< include name="xyz.war"/>
< /fileset>
< /ear>
< /target>
Hope this can solve the problem of building the EAR file.
Regards
Naveen Kumar