| <?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. |
| --> |
| <!-- Build file for Tomcat Native --> |
| <project name="Tomcat Native" default="compile" basedir="."> |
| <!-- Give user a chance to override without editing this file |
| (and without typing -D each time it compiles it |
| --> |
| <property file="${user.home}/build.properties" /> |
| <property file="../../build/build.properties" /> |
| <property file="../build.properties" /> |
| <property file="build.properties" /> |
| <property file="../../build/build.properties.default"/> |
| <property file="../build.properties.default"/> |
| <property file="build.properties.default"/> |
| |
| <!-- Initialization properties --> |
| <property name="project" value="tomcat-native" /> |
| <property name="name" value="Tomcat Native" /> |
| <property name="title" value="Tomcat Native Library"/> |
| <property name="year" value="2012" /> |
| <property name="version.major" value="1" /> |
| <property name="version.minor" value="1" /> |
| <property name="version.build" value="0" /> |
| <property name="version.patch" value="0" /> |
| <property name="version.suffix" value="-dev" /> |
| |
| <property name="version" value="${version.major}.${version.minor}.${version.build}${version.suffix}" /> |
| <property name="version.number" value="${version.major}.${version.minor}.${version.build}.${version.patch}" /> |
| <property name="version.major.minor" value="${version.major}.${version.minor}" /> |
| |
| <property name="final.name" value="${project}-${version}" /> |
| |
| <property name="build.dir" value="./dist"/> |
| <property name="build.src" value="${build.dir}/src"/> |
| <property name="build.dest" value="${build.dir}/classes"/> |
| <property name="dist.root" value="./dist"/> |
| |
| <property name="src.dir" value="."/> |
| |
| <property name="debug" value="off"/> |
| <property name="optimize" value="on"/> |
| <property name="deprecation" value="on"/> |
| |
| <property name="docs.src" value="./xdocs"/> |
| <property name="docs.dest" value="${dist.root}/doc"/> |
| <property name="docs.dest.print" value="${dist.root}/doc/printable"/> |
| |
| <!-- The base directory for component sources --> |
| <property name="source.home" value="java"/> |
| |
| <!-- Build classpath --> |
| <path id="classpath"> |
| <pathelement location="${build.dest}/java"/> |
| </path> |
| |
| <!-- =================================================================== --> |
| <!-- prints the environment --> |
| <!-- =================================================================== --> |
| <target name="prepare"> |
| <mkdir dir="${build.dir}"/> |
| </target> |
| <!-- =================================================================== --> |
| <!-- Creates the API documentation --> |
| <!-- =================================================================== --> |
| <target name="javadocs" description="Java documentation"> |
| <mkdir dir="${docs.dest}"/> |
| <mkdir dir="${docs.dest}/api"/> |
| <javadoc sourcepath="${build.src}/java" |
| destdir="${docs.dest}/api" |
| author="true" |
| version="true" |
| overview="${src.dir}/java/overview.html" |
| packagenames="org.apache.tomcat.*" |
| windowtitle="${title} (Version ${version})" |
| doctitle="<h1>${title} (Version ${version})</h1>" |
| bottom="Copyright 2002-2012 The Apache Software Foundation.<!-- |
| |
| Licensed 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.-->"> |
| <classpath refid="classpath"/> |
| </javadoc> |
| </target> |
| |
| <!-- =================================================================== --> |
| <!-- Cleans up the build directory --> |
| <!-- =================================================================== --> |
| <target name="clean"> |
| <delete dir="${build.dir}"/> |
| </target> |
| |
| <!-- =================================================================== --> |
| <!-- Compiles the source directory --> |
| <!-- =================================================================== --> |
| <target name="compile" depends="prepare"> |
| <mkdir dir="${build.dest}"/> |
| <mkdir dir="${build.dest}/java"/> |
| <mkdir dir="${build.src}"/> |
| <mkdir dir="${build.src}/java"/> |
| <tstamp> |
| <format property="TODAY" pattern="MMM d yyyy" locale="en"/> |
| <format property="TSTAMP" pattern="hh:mm:ss"/> |
| </tstamp> |
| <!-- Copy static resource files --> |
| <filter token="VERSION" value="${version}"/> |
| <filter token="VERSION_NUMBER" value="${version.number}"/> |
| <filter token="VERSION_BUILT" value="${TODAY} ${TSTAMP}"/> |
| <copy todir="${build.src}/java" filtering="yes" encoding="ISO-8859-1"> |
| <fileset dir="${src.dir}/java"> |
| <include name="**/*.java"/> |
| <include name="**/*.xml"/> |
| <include name="**/*.properties"/> |
| </fileset> |
| </copy> |
| |
| <javac srcdir="${build.src}/java" |
| destdir="${build.dest}/java" |
| debug="${debug}" |
| deprecation="${deprecation}" |
| optimize="${optimize}" |
| encoding="ISO-8859-1"> |
| <classpath refid="classpath"/> |
| </javac> |
| <copy todir="${build.dest}/java" filtering="yes" encoding="ISO-8859-1"> |
| <fileset dir="${build.src}/java"> |
| <include name="**/*.xml"/> |
| <include name="**/*.properties"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="compile-only" |
| description="Compile shareable components"> |
| <javac srcdir="${source.home}" |
| destdir="${build.home}/classes" |
| debug="${compile.debug}" |
| deprecation="${compile.deprecation}" |
| optimize="${compile.optimize}" |
| encoding="ISO-8859-1"> |
| <classpath refid="classpath"/> |
| </javac> |
| <copy todir="${build.home}/classes" filtering="on" encoding="ISO-8859-1"> |
| <fileset dir="${source.home}" excludes="**/*.java"/> |
| </copy> |
| </target> |
| |
| <!-- ================================================================== --> |
| <!-- Make Tomcat Native jar --> |
| <!-- ================================================================== --> |
| <target name="jar" depends="compile" |
| description="Generates the Jar file"> |
| <jar |
| destfile="${build.dir}/${final.name}.jar" |
| basedir="${build.dir}/classes/java" |
| excludes="**/*.java"> |
| <manifest> |
| <section name="org/apache/tomcat/jni"> |
| <attribute name="Specification-Title" value="Tomcat Native"/> |
| <attribute name="Specification-Version" value="${version}"/> |
| <attribute name="Specification-Vendor" value="Apache Software Foundation"/> |
| <attribute name="Implementation-Title" value="org.apache.tomcat.jni"/> |
| <attribute name="Implementation-Vendor" value="Apache Software Foundation"/> |
| <attribute name="Implementation-Vendor-Id" value="org.apache"/> |
| <attribute name="Implementation-Version" value="${version} (build ${DSTAMP} ${TSTAMP})"/> |
| </section> |
| </manifest> |
| </jar> |
| </target> |
| </project> |