Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

189 lines (155 sloc) 7.472 kB
<project name="Tomcat Sandbox" default="compile" basedir=".">
<!-- ===================== Initialize Property Values =================== -->
<property file="${user.home}/build.properties"/>
<property file="build.properties"/>
<property file="build.properties.default"/>
<property file="../build/build.properties"/>
<property file="../build/build.properties.default"/>
<property name="tc.base" location=".." />
<!-- Source dependencies -->
<property name="target.vm" value="1.5"/>
<property name="source.vm" value="1.5"/>
<property name="tc6.home" value="${tc.base}/tomcat6"/>
<property name="sandbox.home" value="${tc.base}/sandbox"/>
<property name="tomcat.home" value="${tc.base}/tomcat6/build"/>
<property name="build.home" value="${tc.base}/build"/>
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
<property name="ant-launcher.jar" value="${ant.home}/lib/ant-launcher.jar"/>
<!-- Build Defaults -->
<property name="catalina.build" value="${container.home}/build"/>
<property name="jasper.build" value="${jasper.home}/build"/>
<property name="tomcat.build" value="${basedir}/build"/>
<property name="tomcat-dbcp.home" value="${base.path}/tomcat-deps" />
<property name="tomcat-dbcp.jar" value="${tomcat-dbcp.home}/naming-factory-dbcp.jar"/>
<property name="jasper-compiler-jdt.home" value="${base.path}/tomcat-deps" />
<property name="jasper-compiler-jdt.jar"
value="${jasper-compiler-jdt.home}/jasper-compiler-jdt.jar"/>
<property name="compile.optimize" value="false"/>
<property name="compile.debug" value="true" />
<property name="compile.deprecation" value="false" />
<property name="compile.source" value="1.5" />
<property name="tc6.classes" location="${tc6.home}/.settings/output"/>
<path id="runtime-deps" >
<pathelement location="${base.path}/tomcat-deps/jasper-compiler-jdt.jar" />
</path>
<patternset id="runtime-all-excludes">
<exclude name="org/apache/tomcat/util/buf/**"/>
<exclude name="org/apache/tomcat/util/net/puretls/**"/>
<exclude name="org/apache/tomcat/util/net/jsse/JSSE15SocketFactory.java"/>
<exclude name="org/apache/tomcat/util/net/jsse/JSSE15Factory.java"/>
<exclude name="org/apache/ajp/tomcat33/**"/>
<exclude name="org/apache/ajp/tomcat4/**"/>
<exclude name="org/apache/coyote/tomcat3/**"/>
<exclude name="org/apache/coyote/tomcat4/**"/>
<exclude name="org/apache/coyote/memory/**"/>
<exclude name="org/apache/coyote/standalone/**"/>
<exclude name="**/CatalinaLaunchFilter.java"/>
<exclude name="**/MailSessionFactory.java"/>
<exclude name="**/SendMailFactory.java"/>
<exclude name="**/SemaphoreValve.java"/>
<exclude name="org/apache/catalina/ant/**"/>
<exclude name="org/apache/catalina/ssi/**"/>
</patternset>
<patternset id="runtime-excludes">
<!--
<exclude name="org/apache/tomcat/util/net/AprEndpoint.java"/>
<exclude name="org/apache/coyote/http11/Http11AprProcessor.java"/>
<exclude name="org/apache/coyote/http11/Http11AprProtocol.java"/>
<exclude name="org/apache/coyote/http11/InternalAprInputBuffer.java"/>
<exclude name="org/apache/coyote/http11/InternalAprOutputBuffer.java"/>
-->
<exclude name="org/apache/catalina/loader/CatalinaModuleListener.java"/>
<exclude name="org/apache/catalina/core/NamingContextListener.java"/>
<patternset refid="runtime-all-excludes"/>
</patternset>
<target name="compile-sandbox">
<mkdir dir="${sandbox.home}/classes" />
<javac destdir="${sandbox.home}/classes" source="${source.vm}"
target="${target.vm}"
includeJavaRuntime="false"
deprecation="false"
debug="false" >
<src path="${sandbox.home}/java" />
<classpath>
<path refid="runtime-deps" />
<pathelement location="${tc6.classes}"/>
</classpath>
<exclude name="org/apache/tomcat/standalone/**"/>
</javac>
<copy todir="${sandbox.home}/classes" >
<fileset dir="${sandbox.home}/java" includes="**/*.properties **/*.xml"/>
</copy>
</target>
<target name="compile"
depends="compile-sandbox"/>
<target name="clean-compile">
<delete dir="${sandbox.home}/classes" includes="**"/>
<delete dir="${tc6.classes}" includes="**"/>
</target>
<target name="tomcat-runtime.jar"
description="Build single jar tomcat" depends="compile,pack_tomcat-runtime.jar">
</target>
<target name="pack_tomcat-runtime.jar"
description="Pack single jar tomcat" >
<mkdir dir="runtime" />
<jar jarfile="runtime/tomcat-runtime.jar"
manifest="resources/runtime.MF">
<fileset dir="${tc6.classes}" >
<exclude name="org/apache/jasper/**"/>
</fileset>
<fileset dir="${sandbox.home}/classes" >
<include name="org/apache/tomcat/standalone/**"/>
</fileset>
</jar>
</target>
<target name="coyote-servlet.jar" depends="compile,pack_coyote-servlet.jar"/>
<target name="pack_coyote-servlet.jar" >
<jar destfile="coyote-servlet.jar" manifest="resources/coyote-servlet.MF">
<fileset dir="classes" >
<include name="org/apache/commons/logging/*.class"/>
<include name="org/apache/coyote/servlet/**"/>
<include name="org/apache/tomcat/servlets/**"/>
<include name="org/apache/tomcat/util/buf/**"/>
<include name="org/apache/tomcat/util/loader/**"/>
<include name="org/apache/tomcat/util/net/**"/>
</fileset>
<fileset dir="${tc6.classes}" >
<include name="javax/servlet/*"/>
<include name="javax/servlet/http/*"/>
<include name="org/apache/coyote/*"/>
<include name="org/apache/coyote/http11/Constants.class"/>
<include name="org/apache/coyote/http11/InputFilter.class"/>
<include name="org/apache/coyote/http11/OutputFilter.class"/>
<include name="org/apache/coyote/http11/LocalStrings.properties"/>
<include name="org/apache/coyote/http11/filters/**"/>
<include name="org/apache/tomcat/util/collections/*"/>
<include name="org/apache/tomcat/util/http/*"/>
<include name="org/apache/tomcat/util/http/res/LocalStrings.properties"/>
<include name="org/apache/tomcat/util/res/**"/>
<include name="org/apache/tomcat/util/*"/>
<include name="org/apache/tomcat/util/net/URL*"/>
<include name="org/apache/tomcat/util/*"/>
</fileset>
</jar>
</target>
<target name="all" depends="coyote-servlet.jar,tomcat-runtime.jar" />
<!-- ============ Download targets for deps ================ -->
<target name="download" >
</target>
<target name="testexist">
<echo message="Testing for ${destfile}"/>
<available file="${destfile}" property="exist"/>
</target>
<target name="setproxy" if="useproxy">
<taskdef name="setproxy"
classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
<echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
</target>
<target name="downloadzip" unless="exist" depends="setproxy,testexist">
<get src="${sourcefile}" dest="${base.path}/file.zip" />
<mkdir dir="${destdir}" />
<unzip src="${base.path}/file.zip" dest="${destdir}"/>
<delete file="${base.path}/file.zip"/>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.