Wednesday, February 13, 2008

java: How to deploy EJB in WebSphere using Ant


<property name="package.lib.dir" value="${lib.dir}/package" />

<target name="create-was-ejb">
<property name="ejbdeploy.classpath.prop" refid="ejbdeploy.classpath" />

<path id="ejbdeploy.classpath">
<fileset dir="${package.lib.dir}" includes="*.jar" />
<pathelement location="${was.home}/java/jre/lib/ibmorb.jar" />
</path>

<taskdef
name="wsejbdeploy"
classname="com.ibm.websphere.ant.tasks.WsEjbDeploy"
classpath="${was.home}/lib/wsanttasks.jar" />

<wsejbdeploy
inputJar="${build.dir}/${ant.project.name}-${version}-tmp.jar"
wasHome="${was.home}"
workingDirectory="${build.dir}/ejb-tmp"
classpath="${ejbdeploy.classpath.prop}"
outputJar="${build.dir}/${ant.project.name}-${version}.jar"
compatible35="false"
keepGenerated="true"
quiet="true"
failonerror="true" />
</target>

No comments: