| <?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 default="dispatcher.jar" basedir="." name="Dispatcher build file"> |
| <description> |
| Build system for Apache Forrest Dispatcher. Run the build script: build.bat |
| or build.sh |
| </description> |
| <import file="targets/dispatch.xml"/> |
| <target name="dispatcher.init"> |
| <tstamp> |
| <format property="YEAR" pattern="yyyy" locale="en"/> |
| </tstamp> |
| <property name="dispatcher.build.compiler.emacs" value="on"/> |
| <property name="dispatcher.build.compiler.warnings" value="true"/> |
| <property name="dispatcher.build.compiler.pedantic" value="false"/> |
| <property name="dispatcher.build.compiler.depend" value="true"/> |
| <property name="dispatcher.build.compiler.fulldepend" value="true"/> |
| <property name="dispatcher.build.compiler.debug" value="on"/> |
| <property name="dispatcher.build.compiler.optimize" value="off"/> |
| <property name="dispatcher.build.compiler.deprecation" value="on"/> |
| <property name="dispatcher.build.compiler.nowarn" value="on"/> |
| <property name="dispatcher.build.compiler.type" value="classic"/> |
| <property name="dispatcher.build.compiler.vm" value="1.5"/> |
| <property name="name" value="apache-dispatcher"/> |
| <property name="dispatcher.version" value="0.0.1-dev"/> |
| <property name="dispatcher.home" location="."/> |
| <property file="${dispatcher.home}/local.build.properties" /> |
| <property file="${dispatcher.home}/build.properties" /> |
| <property name="java.dir" location="java"/> |
| <property name="dispatcher.build.dir" location="${dispatcher.home}/build"/> |
| <property name="dispatcher.build.docs" location="${dispatcher.build.dir}/docs"/> |
| <property name="dispatcher.build.classes" location="${dispatcher.build.dir}/classes"/> |
| <property name="dispatcher.lib.dir" location="${dispatcher.home}/lib"/> |
| <property name="dispatcher.lib.api.dir" location="${dispatcher.home}/lib/api"/> |
| <property name="dispatcher.ant.lib-dir" location="${dispatcher.home}/tools/ant/lib"/> |
| <property name="dispatcher.anttasks" location="${dispatcher.home}/tools/anttasks"/> |
| <property name="tools.jar" location="${java.home}/../lib/tools.jar"/> |
| <available file="${tools.jar}" property="tools.jar.present"/> |
| <mkdir dir="${dispatcher.build.dir}"/> |
| <buildnumber file="${dispatcher.build.dir}/build.number"/> |
| <echo> |
| -------------------------------------------------------------- |
| |
| Using ${ant.version} |
| Build file ${ant.file} |
| Use 'build.[sh|bat] -projecthelp' to see other options. |
| Build system home ${ant.home} |
| Build number ${dispatcher.build.number} |
| Project Name ${ant.project.name} |
| Java Version ${ant.java.version} |
| Timestamp ${DSTAMP}${TSTAMP} |
| This is: ${name} ${dispatcher.version} |
| |
| -------------------------------------------------------------- |
| </echo> |
| <path id="dispatcher.classpath"> |
| <fileset dir="${dispatcher.home}/lib" includes="**/*.jar"/> |
| <pathelement location="${tools.jar}"/> |
| </path> |
| <taskdef resource="net/sf/antcontrib/antlib.xml"> |
| <classpath> |
| <fileset dir="${dispatcher.ant.lib-dir}" includes="ant-contrib-*.jar" /> |
| </classpath> |
| </taskdef> |
| </target> |
| <target name="dispatcher.clean" depends="dispatcher.init" description="Delete all generated files"> |
| <delete dir="${dispatcher.build.dir}"/> |
| </target> |
| <target name="dispatcher.clean-cache" depends="dispatcher.init" |
| description="Delete dispatcher cache dir."> |
| <echo>Deleting cache dir ${dispatcher.cache}</echo> |
| <delete dir="${dispatcher.cache}"/> |
| </target> |
| <!-- =================================================================== --> |
| <!-- Clean build, that is clean before build --> |
| <!-- =================================================================== --> |
| <target name="dispatcher.clean-build" depends="dispatcher.clean, dispatcher.jar" description="Clean build, that is clean before build..." /> |
| <!-- =================================================================== --> |
| <!-- Compile Dispatcher java classes --> |
| <!-- =================================================================== --> |
| <target name="dispatcher.compile" depends="dispatcher.init"> |
| <mkdir dir="${dispatcher.build.classes}"/> |
| <javac srcdir= "${java.dir}" |
| destdir= "${dispatcher.build.classes}" |
| debug= "${dispatcher.build.compiler.debug}" |
| optimize= "${dispatcher.build.compiler.optimize}" |
| deprecation= "${dispatcher.build.compiler.deprecation}" |
| nowarn= "${dispatcher.build.compiler.nowarn}" |
| classpathref= "dispatcher.classpath"></javac> |
| </target> |
| <!-- =================================================================== --> |
| <!-- Jar dispatcher classes --> |
| <!-- =================================================================== --> |
| <target name="dispatcher.jar" depends="dispatcher.init, dispatcher.compile" description="Generates the dispatcher jar."> |
| <jar destfile="${dispatcher.build.dir}/dispatcher-${dispatcher.version}.jar" |
| basedir="${dispatcher.build.classes}"> |
| <manifest> |
| <section name="org/apache/forrest/dispatcher/"> |
| <attribute name="Comment" value="Support classes for Apache Forrest Dispatcher"/> |
| <attribute name="Implementation-Title" value="org.apache.forrest.dispatcher"/> |
| <attribute name="Implementation-Version" value="${dispatcher.version} ${TODAY}"/> |
| <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/> |
| <attribute name="Implementation-URL" value="http://forrest.apache.org/dipatcher/"/> |
| </section> |
| </manifest> |
| </jar> |
| <echo> |
| +-------------------------------------------------------------------------+ |
| | Installation notice |
| +-------------------------------------------------------------------------+ |
| | You have built the ${dispatcher.version} version of the dispatcher. |
| | |
| | find the jar: |
| | ${dispatcher.build.dir}/dispatcher-${dispatcher.version}.jar |
| +-------------------------------------------------------------------------+ |
| </echo> |
| </target> |
| <target name="dispatcher.-prepare-classpath"> |
| <path id="dispatcher.cp"> |
| <pathelement path="${env.CLASSPATH}" /> |
| <pathelement location="${dispatcher.build.classes}"/> |
| <fileset dir="${dispatcher.lib.dir}" casesensitive="no"> |
| <include name="*.jar"/> |
| <include name="*.zip"/> |
| </fileset> |
| <fileset dir="${dispatcher.lib.api.dir}" casesensitive="no"> |
| <include name="*.jar"/> |
| <include name="*.zip"/> |
| </fileset> |
| <pathelement location="${tools.jar}"/> |
| </path> |
| </target> |
| </project> |