Section 5.4. Creating a HAR


5.4. Creating a HAR

Now that we created the HBM files and the Hibernate MBean service deployment descriptor, we are ready to bundle things up and deploy it as a part of the EAR.

Hibernate applications are bundled up in a Hibernate Archive (HAR). We use the standard Ant <jar> task in Example 5-5 to create the HAR.

Example 5-5. build.xml
 <!-- ====================================== -->     <target name="har" depends="generate-hbm"             description="Builds the Hibernate HAR file">         <mkdir dir="${distribution.dir}" />         <jar destfile="${distribution.dir}/jaw.har">             <!-- include the hbm.xml files  -->             <fileset dir="${gen.source.dir}">                 <include name="**/*.hbm.xml"/>             </fileset>             <!-- include hibernate-service.xml -->             <metainf dir="${hibernate.dir}">                 <include name="hibernate-service.xml"/>             </metainf>         </jar>     </target> 



JBoss at Work. A Practical Guide
JBoss at Work: A Practical Guide
ISBN: 0596007345
EAN: 2147483647
Year: 2004
Pages: 197

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net