<import file="../../build.xml" />
|
|
<property name="root.base.dir" value="../.." />
|
|
<property name="dist.dir" value="${build.dir}/dist" />
|
|
<property name="module.name" value="spring-hibernate" />
|
|
<property name="dist.jar" value="${dist.dir}/${dist.jar.name}" />
|
|
<property name="deploy.dir" value="${env.CATALINA_HOME}/webapps" />
|
|
<property name="dist.jar.name" value="${project.name}-${module.name}.jar" />
|
|
<property name="dist.war.name" value="${project.name}-${module.name}.war" />
|
|
<property name="dist.war" value="${root.base.dir}/build/${dist.war.name}" />
|
|
<property name="module.base.dir" value="${root.base.dir}/samples/spring-hibernate" />
|
|
<target name="deploy" depends="dist,quick-deploy" description="Creates and deploys the spring-hibernate sample app .war to Tomcat" />
|
|
<path id="compile.path" />
| <fileset dir="${lib.dir}" includes="**/*.jar" />
|
|
|
|
<target name="clean-deploy-dir" description="Removes the deployed war directory" />
| <delete file="${deploy.dir}/${dist.war.name}" />
|
| <delete dir="${deploy.dir}/${project.name}-${module.name}" />
|
| <echo message="cleaning ${dist.war.name} module from ${deploy.dir}" />
|
|
|
|
<target name="clean" depends="clean-deploy-dir" description="Cleans the spring-hibernate sample application build" />
| <delete file="${dist.war}" />
|
| <delete dir="${build.dir}" />
|
| <echo message="cleaning ${module.name} module" />
|
|
|
|
<target name="quick-deploy" description="Blindly deploys the spring-hibernate sample app .war to Tomcat" />
| <touch file="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}/WEB-INF/web.xml" />
|
| <unzip src="${dist.war}" dest="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}" />
|
| <echo />
| Deploying application to Tomcat...
|
|
|
|
|
|
<target name="compile" description="Compiles the sample spring-hibernate app classes" />
| <mkdir dir="${classes.dir}" />
|
| <mkdir dir="${classes.dir}/META-INF" />
|
| <javac destdir="${classes.dir}" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" failonerror="true" classpathref="all.libs" />
| <src path="${src.dir}" />
|
| <classpath location="${root.dist.dir}/jsecurity.jar" />
|
|
|
|
|
|
<target name="jar" depends="compile" description="Creates a jar of the spring-hibernate sample app classes" />
| <mkdir dir="${dist.dir}" />
|
| <jar jarfile="${dist.dir}/${dist.jar.name}" />
| <fileset dir="${classes.dir}" />
| <include name="**/*.class" />
|
|
|
| <manifest />
| <attribute name="Implementation-Version" value="${version}" />
|
| <attribute name="${project.name}-Version" value="${version}" />
|
| <attribute name="Implementation-Title" value="${project.name}-${module.name}" />
|
|
|
|
|
|
|
|
<target name="dist" depends="compile,jar" description="Creates the quickstart .war" />
| <war warfile="${dist.war}" webxml="WEB-INF/web.xml" />
| <lib dir="${dist.dir}" includes="*.jar" />
|
| <lib dir="${root.dist.dir}" includes="jsecurity.jar" />
|
| <fileset dir="${module.base.dir}" includes="**" excludes="**/web.xml, **/build.xml" />
|
| <lib dir="${lib.dir}/samples" />
| <include name="jstl.jar" />
|
| <include name="log4j.jar" />
|
| <include name="hsqldb.jar" />
|
| <include name="spring.jar" />
|
| <include name="ehcache.jar" />
|
| <include name="standard.jar" />
|
| <include name="commons-*.jar" />
|
| <include name="backport-util-concurrent.jar" />
|
|
|
| <lib dir="${lib.dir}/samples" />
| <include name="asm.jar" />
|
| <include name="antlr.jar" />
|
| <include name="cglib.jar" />
|
| <include name="dom4j.jar" />
|
| <include name="hibernate.jar" />
|
| <include name="asm-attrs.jar" />
|
| <include name="commons-collections.jar" />
|
| <include name="geronimo-jta_1.0.1B_spec.jar" />
|
|
|
|
|
|
|
|