Skip to Main Content
Ant: The Definitive Guide, 2nd Edition
book

Ant: The Definitive Guide, 2nd Edition

by Steve Holzner
April 2005
Intermediate to advanced content levelIntermediate to advanced
336 pages
7h 20m
English
O'Reilly Media, Inc.
Content preview from Ant: The Definitive Guide, 2nd Edition

Deploying to EJB Containers

Fundamentally, deploying to Enterprise JavaBean (EJB) application servers is similar to other Ant deployment projects you've seen. You can use the tasks covered to package and deploy EJB applications. For example, you can see a build file developed for the JBoss server in Example 8-6; this build file first creates a .war file and then packages it into an .ear file for deployment.

Example 8-6. A Jboss EJB build (ch08/ejb/build.xml)

<?xml version="1.0" ?> <project default="main" basedir="."> <target name="main" depends="init, compile, war, ear"/> <target name="init"> <property name="src" value="${basedir}/src"/> <property name="bin" value="${basedir}/output"/> <property name="web" value="${basedir}/web"/> <property name="descriptors" value="${basedir}/output/deploymentdescriptors"/> <property name="eardir" value="${basedir}/output/ear"/> <property name="wardir" value="${basedir}/output/war"/> <property name="warfile" value="app.war"/> <property name="earfile" value="app.ear"/> <mkdir dir="${wardir}/WEB-INF"/> <mkdir dir="${wardir}/WEB-INF/classes"/> <mkdir dir="${eardir}/META-INF"/> </target> <target name="compile"> <javac destdir="${bin}" srcdir="${src}" includes="**/*.java" /> </target> <target name="war"> <copy todir="${wardir}"> <fileset dir="${web}" includes="**/*.*" /> </copy> <copy file="${descriptors}/web.xml" todir="${wardir}/WEB-INF" /> <copy todir="${wardir}/WEB-INF/classes"> <fileset dir="${bin}" includes="**/*.class" /> </copy> <jar jarfile="${eardir}/${warfile}" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ant: The Definitive Guide

Ant: The Definitive Guide

Eric M. Burke, Jesse Tilly
Tomcat: The Definitive Guide, 2nd Edition

Tomcat: The Definitive Guide, 2nd Edition

Jason Brittain, Ian F. Darwin
Ant in Action

Ant in Action

Erik Hatcher, Steve Loughran
CMake Cookbook

CMake Cookbook

Radovan Bast, Roberto Di Remigio

Publisher Resources

ISBN: 0596006098Supplemental ContentErrata Page