107 lines
4.2 KiB
XML
107 lines
4.2 KiB
XML
<?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.
|
|
|
|
$Header:$
|
|
-->
|
|
|
|
<project name="Beehive Spring-Controls webapp sample" default="build" basedir=".">
|
|
|
|
<property environment="os"/>
|
|
<property file="build.properties"/>
|
|
<import file="${beehive.home}/beehive-imports.xml"/>
|
|
<import file="${beehive.home}/ant/beehive-tools.xml"/>
|
|
|
|
<property name="webapp.dir" location="build"/>
|
|
<property name="src.dir" location="src"/>
|
|
|
|
<property name="context.path" value="springControls"/>
|
|
|
|
<!-- ========================================= -->
|
|
<!-- build.spring - build the Spring integration -->
|
|
<!-- ========================================= -->
|
|
<target name="build.spring-integration" description="Build Spring integration jar">
|
|
|
|
<path id="build.classpath">
|
|
<pathelement location="${servlet-api.jar}"/>
|
|
<pathelement location="${os.JAVA_HOME}/lib/tools.jar"/>
|
|
<pathelement location="external/spring-1.1.5.jar"/>
|
|
<path refid="controls.dependency.path"/>
|
|
</path>
|
|
|
|
<mkdir dir="build-spring-integration/classes"/>
|
|
|
|
<javac srcdir="src-spring-integration"
|
|
destdir="build-spring-integration/classes"
|
|
classpathref="build.classpath"
|
|
debug="on"/>
|
|
|
|
<copy todir="build-spring-integration/classes" overwrite="true">
|
|
<fileset dir="src-spring-integration/src" includes="META-INF/**"/>
|
|
</copy>
|
|
|
|
<jar destfile="build-spring-integration/beehive-samples-spring.jar" basedir="build-spring-integration/classes"/>
|
|
</target>
|
|
|
|
<!-- ========================================= -->
|
|
<!-- build - build the webapp -->
|
|
<!-- ========================================= -->
|
|
<target name="build" depends="build.spring-integration" description="Build the webapp">
|
|
<mkdir dir="${webapp.dir}"/>
|
|
<mkdir dir="${webapp.dir}/WEB-INF/lib"/>
|
|
<mkdir dir="${webapp.dir}/WEB-INF/classes"/>
|
|
|
|
<deploy-controls destDir="${webapp.dir}/WEB-INF/lib"/>
|
|
|
|
<copy todir="${webapp.dir}">
|
|
<fileset dir="web"/>
|
|
</copy>
|
|
|
|
<copy todir="${webapp.dir}/WEB-INF/lib" overwrite="true" failOnError="true">
|
|
<fileset dir="build-spring-integration" includes="beehive-samples-spring.jar"/>
|
|
<fileset dir="external" includes="*.jar"/>
|
|
</copy>
|
|
|
|
<path id="webapp.classpath">
|
|
<fileset dir="${webapp.dir}/WEB-INF/lib"/>
|
|
</path>
|
|
|
|
<build-controls srcdir="${src.dir}"
|
|
destdir="${webapp.dir}/WEB-INF/classes"
|
|
tempdir="${webapp.dir}/WEB-INF/.tmpbeansrc"
|
|
classpathRef="webapp.classpath"/>
|
|
</target>
|
|
|
|
<!-- ========================================= -->
|
|
<!-- clean - clean the webapp -->
|
|
<!-- ========================================= -->
|
|
<target name="clean" description="Clean the webapp">
|
|
<delete dir="build"/>
|
|
<delete dir="build-spring-integration"/>
|
|
</target>
|
|
|
|
<target name="war" description="Build a compressed WAR file that can be deployed to an application container">
|
|
<property name="archive.dir" location="${basedir}"/>
|
|
|
|
<war destfile="${archive.dir}/${context.path}.war" webxml="${webapp.dir}/WEB-INF/web.xml">
|
|
<fileset dir="${webapp.dir}">
|
|
<exclude name="WEB-INF/web.xml"/>
|
|
</fileset>
|
|
</war>
|
|
</target>
|
|
|
|
</project>
|