Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame^] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
| 2 | <!--
|
| 3 | Licensed to the Apache Software Foundation (ASF) under one or more
|
| 4 | contributor license agreements. See the NOTICE file distributed with
|
| 5 | this work for additional information regarding copyright ownership.
|
| 6 | The ASF licenses this file to You under the Apache License, Version 2.0
|
| 7 | (the "License"); you may not use this file except in compliance with
|
| 8 | the License. You may obtain a copy of the License at
|
| 9 |
|
| 10 | http://www.apache.org/licenses/LICENSE-2.0
|
| 11 |
|
| 12 | Unless required by applicable law or agreed to in writing, software
|
| 13 | distributed under the License is distributed on an "AS IS" BASIS,
|
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 15 | See the License for the specific language governing permissions and
|
| 16 | limitations under the License.
|
| 17 | -->
|
| 18 | <project name="ROOT" default="build-main" basedir=".">
|
| 19 |
|
| 20 |
|
| 21 | <!-- ===================== Initialize Property Values =================== -->
|
| 22 |
|
| 23 | <!-- See "build.properties.sample" in the top level directory for all -->
|
| 24 | <!-- property values you must customize for successful building!!! -->
|
| 25 | <property file="build.properties"/>
|
| 26 | <property file="../build.properties"/>
|
| 27 | <property file="../../build.properties"/>
|
| 28 | <property file="${user.home}/build.properties"/>
|
| 29 |
|
| 30 | <property name="build.compiler" value="modern"/>
|
| 31 | <property name="webapps.build" value="../build"/>
|
| 32 | <property name="webapps.dist" value="../dist"/>
|
| 33 | <property name="webapp.name" value="ROOT"/>
|
| 34 |
|
| 35 |
|
| 36 | <!-- =================== BUILD: Create Directories ====================== -->
|
| 37 | <target name="build-prepare">
|
| 38 | <mkdir dir="${webapps.build}"/>
|
| 39 | <mkdir dir="${webapps.build}/${webapp.name}"/>
|
| 40 | </target>
|
| 41 |
|
| 42 |
|
| 43 | <!-- ================ BUILD: Copy Static Files ========================== -->
|
| 44 | <target name="build-static" depends="build-prepare">
|
| 45 | <copy todir="${webapps.build}/${webapp.name}">
|
| 46 | <fileset dir=".">
|
| 47 | <exclude name="build.*"/>
|
| 48 | </fileset>
|
| 49 | </copy>
|
| 50 | </target>
|
| 51 |
|
| 52 |
|
| 53 | <!-- ================= BUILD: Compile Server Components ================= -->
|
| 54 | <target name="build-main" depends="build-static"/>
|
| 55 |
|
| 56 |
|
| 57 | <!-- ==================== BUILD: Rebuild Everything ===================== -->
|
| 58 | <target name="all" depends="build-clean,build-main"
|
| 59 | description="Clean and build ROOT webapp"/>
|
| 60 |
|
| 61 |
|
| 62 | <!-- ======================= BUILD: Clean Directory ===================== -->
|
| 63 | <target name="build-clean">
|
| 64 | <delete dir="${webapps.build}/${webapp.name}"/>
|
| 65 | </target>
|
| 66 |
|
| 67 |
|
| 68 | <!-- ======================= DIST: Create Directories =================== -->
|
| 69 | <target name="dist-prepare">
|
| 70 | <mkdir dir="${webapps.dist}"/>
|
| 71 | </target>
|
| 72 |
|
| 73 |
|
| 74 | <!-- ======================= DIST: Create Distribution Files ============ -->
|
| 75 | <target name="dist" depends="build-main,dist-prepare"
|
| 76 | description="Create ROOT webapp binary distribution">
|
| 77 | <jar jarfile="${webapps.dist}/${webapp.name}.war"
|
| 78 | basedir="${webapps.build}/${webapp.name}" includes="**"/>
|
| 79 | </target>
|
| 80 |
|
| 81 |
|
| 82 | <!-- ======================= DIST: Clean Directory ====================== -->
|
| 83 | <target name="dist-clean">
|
| 84 | <delete dir="${webapps.dist}/${webapp.name}"/>
|
| 85 | </target>
|
| 86 |
|
| 87 |
|
| 88 | <!-- ====================== Convenient Synonyms ========================= -->
|
| 89 | <target name="clean" depends="build-clean,dist-clean"
|
| 90 | description="Clean build and dist directories"/>
|
| 91 |
|
| 92 |
|
| 93 | </project>
|