| <?xml version="1.0"?> |
| |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one |
| ~ or more contributor license agreements. See the NOTICE file |
| ~ distributed with this work for additional information |
| ~ regarding copyright ownership. The ASF licenses this file |
| ~ to you under the Apache License, Version 2.0 (the |
| ~ "License"); you may not use this file except in compliance |
| ~ with the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, |
| ~ software distributed under the License is distributed on an |
| ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~ KIND, either express or implied. See the License for the |
| ~ specific language governing permissions and limitations |
| ~ under the License. |
| --> |
| <project name="spring-hibernate" default="package"> |
| |
| <property name="root.base.dir" value="../.."/> |
| <property name="module.name" value="samples-sprhib"/> |
| <import file="${root.base.dir}/common.ant.xml"/> |
| <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/> |
| <property name="dist.jar" value="${dist.dir}/samples/${dist.jarName}.jar"/> |
| <property name="dist.warName" value="${project.name}-${module.name}-${version}"/> |
| <property name="dist.war" value="${dist.dir}/samples/${dist.warName}.war"/> |
| |
| <path id="compile.path"> |
| <fileset dir="${lib.dir}/samples"> |
| <include name="*.jar"/> |
| </fileset> |
| <fileset dir="${dist.dir}/modules"> |
| <include name="${project.name}-core-${version}.jar"/> |
| <include name="${project.name}-web-${version}.jar"/> |
| </fileset> |
| </path> |
| |
| <!-- =================================================================== |
| clean - clean all build remnants from this submodule |
| ==================================================================== --> |
| <target name="clean-deploy-dir" description="Removes the deployed war directory"> |
| <echo message="cleaning ${dist.warName} module from ${deploy.dir}"/> |
| <delete file="${deploy.dir}/${dist.warName}.war"/> |
| <delete dir="${deploy.dir}/${dist.warName}"/> |
| </target> |
| <target name="clean" depends="clean-deploy-dir" description="Cleans the Spring/Hibernate sample webapp build"> |
| <echo message="cleaning ${module.name} module"/> |
| <delete file="${dist.jar}"/> |
| <delete file="${dist.war}"/> |
| <delete dir="${build.dir}"/> |
| </target> |
| |
| <target name="compile" depends="compile.src"/> <!-- no test classes, no need to depend on compile.test --> |
| |
| <target name="war"> |
| <war warfile="${dist.war}" webxml="WEB-INF/web.xml"> |
| <lib dir="${dist.dir}" includes="*.jar"/> |
| <lib dir="${root.dist.dir}" includes="jsecurity.jar"/> |
| <lib dir="${lib.dir}/samples"> |
| <include name="jstl-*.jar"/> |
| <include name="standard-*.jar"/> |
| <include name="log4j-*.jar"/> |
| <include name="commons-*.jar"/> |
| <include name="ehcache-*.jar"/> |
| <include name="backport-util-concurrent-*.jar"/> |
| <include name="hsqldb-*.jar"/> |
| <include name="spring-*.jar"/> |
| </lib> |
| <!-- Hibernate libs: --> |
| <lib dir="${lib.dir}/samples"> |
| <include name="hibernate-*.jar"/> |
| <include name="antlr-*.jar"/> |
| <include name="asm-attrs-*.jar"/> |
| <include name="asm-*.jar"/> |
| <include name="cglib-*.jar"/> |
| <include name="geronimo-jta_1.0.1B_spec.jar"/> |
| <include name="dom4j-*.jar"/> |
| <include name="commons-collections-*.jar"/> |
| </lib> |
| <fileset dir="${base.dir}" includes="**" excludes="**/web.xml, **/build.xml"/> |
| </war> |
| |
| </target> |
| |
| <target name="package" depends="jar,war"/> |
| |
| <target name="quick-deploy" description="Blindly deploys the sample Spring/Hibernate .war to Tomcat"> |
| <echo>Deploying application to Tomcat...</echo> |
| <unzip src="${dist.war}" dest="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}"/> |
| <touch file="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}/WEB-INF/web.xml"/> |
| </target> |
| |
| <target name="deploy" depends="package,quick-deploy" |
| description="Creates and deploys the sample Spring/Hibernate .war to Tomcat"/> |
| |
| </project> |