<?xml version="1.0" encoding="UTF-8"?>
<project name="Jboss 5.0 Ear Deployment with Servlet and JSP" default="run" basedir=".">

	<property name="lib.home" value="${basedir}/lib" />

	<!-- Define the CLASSPATH -->
	<path id="compile.classpath">
		<fileset dir="${basedir}/lib">
			<include name="*.jar"/>
		</fileset>
	</path>

	<target name="clean">
		<delete dir="build"/>
	</target>

	<target name="compile">
		<mkdir dir="build/classes"/>
		<javac srcdir="src" destdir="build/classes" includeantruntime="false">
			<classpath refid="compile.classpath"/>
		</javac>
	</target>

	<target name="jar" depends="clean,compile">
		<mkdir dir="build/jar"/>
		<jar destfile="build/jar/HelloWorld.jar" basedir="build/classes">
			<manifest>
				<attribute name="Main-Class" value="com.javahonk.HelloWorld"/>
			</manifest>			
		</jar>
	</target>

	<target name="run" depends="clean,compile,jar">
		<java jar="build/jar/HelloWorld.jar" fork="true"/>
	</target>

</project>