<target name="build-prepare">
<available classname="junit.framework.TestCase" property="junit.present" />
-
+
<mkdir dir="${tomcat.classes}"/>
<delete dir="${tomcat.build}/temp" />
optimize="${compile.optimize}"
excludes="**/CVS/**,**/.svn/**"
encoding="ISO-8859-1"
- includeAntRuntime="true" >
-<!-- Comment this in to show unchecked warnings:
+ includeAntRuntime="true" >
+<!-- Comment this in to show unchecked warnings:
<compilerarg value="-Xlint:unchecked"/>
-->
<classpath refid="tomcat.classpath" />
<include name="javax/servlet/http/*" />
<include name="javax/servlet/resources/*" />
</patternset>
-
+
<patternset id="files.jsp-api">
<include name="javax/servlet/jsp/**" />
</patternset>
<patternset id="files.jasper">
<include name="org/apache/jasper/**" />
</patternset>
-
+
<patternset id="files.jasper-el">
<include name="org/apache/el/**" />
</patternset>
<!-- Pattern sets for embedded JARs -->
<patternset id="files.tomcat-embed-core" >
- <patternset refid="files.annotations-api" />
+ <patternset refid="files.annotations-api" />
<patternset refid="files.servlet-api" />
<patternset refid="files.el-api" />
<patternset refid="files.bootstrap" />
<patternset refid="files.jasper" />
<patternset refid="files.jasper-el" />
</patternset>
-
+
<!-- Pattern sets used directly -->
<!--<patternset refid="files.tomcat-juli" />-->
<!--<patternset refid="files.catalina-tribes" />-->
<!--<patternset refid="files.catalina-ha" />-->
<!--<patternset refid="files.catalina-ant" />-->
-
+
<macrodef name="jarIt" description="utility macro for standard JAR packaging">
<attribute name="jarfile" description="the name of the JAR file to create"/>
<attribute name="filesDir" description="the directory to obtain the files from"/>
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
- <zipfileset file="@{notice}" fullpath="META-INF/NOTICE" />
+ <zipfileset file="@{notice}" fullpath="META-INF/NOTICE" />
<zipfileset file="@{license}" fullpath="META-INF/LICENSE" />
</jar>
</sequential>
</macrodef>
-
+
<target name="build-manifests" >
<!-- Filtering tokens for JAR manifests-->
<filter token="source.jdk" value="${compile.source}"/>
<filterset refid="version.filters"/>
<fileset dir="${tomcat.home}/res/META-INF" includes="*.manifest" />
</copy>
-
+
</target>
<target name="package" depends="build-manifests" >
<include name="**/LocalStrings_es.properties" />
</fileset>
<zipfileset file="res/META-INF/default.notice"
- fullpath="META-INF/NOTICE" />
+ fullpath="META-INF/NOTICE" />
<zipfileset file="res/META-INF/default.license"
- fullpath="META-INF/LICENSE" />
+ fullpath="META-INF/LICENSE" />
</jar>
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-fr.jar"
manifest="${tomcat.tmp}/default.manifest" >
<param name="relative-path" expression=".."/>
</xslt>
</target>
-
+
<target name="deploy" depends="build-only,build-docs"
description="Default. Builds a working Tomcat instance">
<include name="**/*.bat"/>
</fileset>
</copy>
- <!-- Copy doesn't retain permissions -->
+ <!-- Copy doesn't retain permissions -->
<chmod dir="${tomcat.build}/bin" includes="*.sh" perm="+x"/>
<!-- Copy static resource files -->
<copy todir="${tomcat.build}/webapps">
<fileset dir="webapps">
<include name="ROOT/**"/>
- <exclude name="ROOT/index.html"/>
+ <exclude name="ROOT/index.html"/>
<include name="examples/**"/>
<include name="manager/**"/>
<include name="host-manager/**"/>
</fileset>
</txt2html>
- <copy file="${tomcat-dbcp.jar}" todir="${tomcat.build}/lib"
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.build}/lib"
failonerror="false"/>
<copy file="${jasper-jdt.jar}" todir="${tomcat.build}/lib" />
depends="build-prepare,build-manifests,compile" >
<mkdir dir="${tomcat.embed}" />
-
- <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" />
+
+ <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" />
<copy file="${basedir}/NOTICE" todir="${tomcat.embed}" />
- <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}"
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}"
failonerror="false"/>
<copy file="${jasper-jdt.jar}" todir="${tomcat.embed}" />
<mkdir dir="${tomcat.embed.sources}" />
<!--No sources for jasper-jdt-->
-
+
<jarIt jarfile="${tomcat-embed-core-sources.jar}"
- filesDir="java"
+ filesDir="java"
filesId="files.tomcat-embed-core"/>
<jarIt jarfile="${tomcat-embed-jasper-sources.jar}"
filesDir="java"
<target name="test" description="Runs the JUnit test cases"
depends="compile,test-compile" >
-
- <junit printsummary="yes" fork="yes">
- <classpath refid="tomcat.test.classpath" />
+
+ <junit printsummary="yes" fork="yes">
+ <classpath refid="tomcat.test.classpath" />
<formatter type="plain" usefile="false" />
<batchtest>
<fileset dir="test" >
<!-- Include all by default -->
- <include name="**/Test*.java" />
+ <include name="**/Test*.java" />
<!-- Exclude TestAll ortherwise there will be duplicated -->
<exclude name="**/TestAll.java" />
<!-- Exclude helper classes -->
<!-- Exclude the tests known to fail -->
<exclude name="org/apache/catalina/tribes/**" />
</fileset>
- </batchtest>
- </junit>
+ </batchtest>
+ </junit>
</target>
<target name="clean-depend"
</target>
<target name="clean"
- description="Delete the default output folders">
+ description="Delete the default output folders">
<delete dir="${tomcat.classes}" />
<delete dir="${tomcat.build}" />
<delete dir="${tomcat.tmp}" />
<antcall target="downloadzip">
<param name="sourcefile" value="${nsis.loc}"/>
<param name="destfile" value="${nsis.exe}"/>
- <param name="destdir" value="${nsis.home}/.."/>
+ <param name="destdir" value="${nsis.home}/.."/>
</antcall>
<!-- Download json libraries -->
</javac>
<jar jarfile="${tomcat-dbcp.jar}"
index="true"
- manifest="${tomcat.tmp}/default.manifest">
+ manifest="${tomcat.tmp}/default.manifest">
<fileset dir="${tomcat-dbcp.home}/classes">
<include name="**/*.class" />
<include name="**/*.properties" />
<target name="build-jasper-jdt" depends="build-manifests" >
<unjar src="${jdt.jar}" dest="${jasper-jdt.home}" />
<jar destfile="${jasper-jdt.jar}" index="true"
- manifest="${tomcat.tmp}/default.manifest">
+ manifest="${tomcat.tmp}/default.manifest">
<fileset dir="${jasper-jdt.home}">
<include name="org/eclipse/jdt/core/compiler/**"/>
<include name="org/eclipse/jdt/internal/compiler/**"/>
</target>
<target name="clean" description="Delete the default output folders">
- <delete dir="${tomcat.extras}"/>
+ <delete dir="${tomcat.extras}"/>
<delete dir="${tomcat.embed}"/>
</target>
<target name="commons-logging" depends="prepare"
- description="Build JULI for log4j extras package">
-
+ description="Build JULI for log4j extras package">
+
<antcall target="downloadfile">
<param name="sourcefile" value="${commons-logging-src.loc}"/>
<param name="destfile" value="${tomcat.extras}/logging/commons-logging-src.tar.gz"/>
<param name="destdir" value="${tomcat.extras}/logging/"/>
</antcall>
- <gunzip src="${tomcat.extras}/logging/commons-logging-src.tar.gz"
- dest="${tomcat.extras}/logging/commons-logging-src.tar"/>
- <untar src="${tomcat.extras}/logging/commons-logging-src.tar"
- dest="${tomcat.extras}/logging/"/>
-
+ <gunzip src="${tomcat.extras}/logging/commons-logging-src.tar.gz"
+ dest="${tomcat.extras}/logging/commons-logging-src.tar"/>
+ <untar src="${tomcat.extras}/logging/commons-logging-src.tar"
+ dest="${tomcat.extras}/logging/"/>
+
<replace dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/src/java/org/apache/commons"
encoding="ISO-8859-1">
<replacefilter token="org.apache.commons"
</move>
<replace dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src"
- encoding="ISO-8859-1">
+ encoding="ISO-8859-1">
<replacefilter token="org.apache.commons"
- value="org.apache.juli" />
- <replacefilter token="org/apache/commons/"
- value="org/apache/juli/" />
+ value="org.apache.juli" />
+ <replacefilter token="org/apache/commons/"
+ value="org/apache/juli/" />
</replace>
- <copy tofile="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/build2.xml"
- file="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/build.xml" />
+ <copy tofile="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/build2.xml"
+ file="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/build.xml" />
- <ant antfile="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/build2.xml"
- dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src"
- target="getlibs" />
+ <ant antfile="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/build2.xml"
+ dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src"
+ target="getlibs" />
<copy todir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src">
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/lib" />
</copy>
- <ant antfile="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/build2.xml"
- dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src"
- target="compile" />
-
+ <ant antfile="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/build2.xml"
+ dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src"
+ target="compile" />
+
<jar jarfile="${tomcat-juli.jar}"
manifest="${tomcat.tmp}/default.manifest" >
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/target/classes">
- <include name="org/apache/juli/logging/*.class" />
- <include name="org/apache/juli/logging/impl/LogFactoryImpl*.class" />
- <include name="org/apache/juli/logging/impl/WeakHashtable*.class" />
- <include name="org/apache/juli/logging/impl/SimpleLog*.class" />
- <include name="org/apache/juli/logging/impl/NoOpLog*.class" />
- <include name="org/apache/juli/logging/impl/Jdk14Logger.class" />
+ <include name="org/apache/juli/logging/*.class" />
+ <include name="org/apache/juli/logging/impl/LogFactoryImpl*.class" />
+ <include name="org/apache/juli/logging/impl/WeakHashtable*.class" />
+ <include name="org/apache/juli/logging/impl/SimpleLog*.class" />
+ <include name="org/apache/juli/logging/impl/NoOpLog*.class" />
+ <include name="org/apache/juli/logging/impl/Jdk14Logger.class" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</antcall>
<jar jarfile="${tomcat-juli-adapters.jar}"
- manifest="${tomcat.tmp}/default.manifest" >
+ manifest="${tomcat.tmp}/default.manifest" >
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/target/classes">
- <include name="org/apache/juli/logging/impl/**.class" />
- <exclude name="org/apache/juli/logging/impl/WeakHashtable*.class" />
- <exclude name="org/apache/juli/logging/impl/LogFactoryImpl.class" />
+ <include name="org/apache/juli/logging/impl/**.class" />
+ <exclude name="org/apache/juli/logging/impl/WeakHashtable*.class" />
+ <exclude name="org/apache/juli/logging/impl/LogFactoryImpl.class" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</target>
<target name="webservices" depends="prepare"
- description="Build web services extras package">
-
- <mkdir dir="${tomcat.extras}/webservices"/>
-
- <antcall target="downloadfile">
- <param name="sourcefile" value="${jaxrpc-src.loc}"/>
- <param name="destfile" value="${tomcat.extras}/webservices/jaxrpc.jar"/>
- <param name="destdir" value="${tomcat.extras}/webservices/"/>
- </antcall>
-
- <antcall target="downloadfile">
- <param name="sourcefile" value="${wsdl4j-src.loc}"/>
- <param name="destfile" value="${tomcat.extras}/webservices/wsdl4j.jar"/>
- <param name="destdir" value="${tomcat.extras}/webservices/"/>
- </antcall>
-
- <!-- Classpath -->
- <path id="tomcat.webservices.classpath">
- <pathelement path="${tomcat.classpath}"/>
- <fileset dir="${tomcat.extras}/webservices">
- <include name="jaxrpc.jar"/>
- <include name="wsdl4j.jar"/>
- </fileset>
- </path>
-
- <!-- Compile internal server components -->
- <javac srcdir="java" destdir="${tomcat.classes}"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- source="${compile.source}"
- optimize="${compile.optimize}"
- encoding="ISO-8859-1">
- <classpath refid="tomcat.webservices.classpath" />
- <include name="org/apache/naming/factory/webservices/**" />
- </javac>
-
- <!-- Catalina Main JAR File -->
- <jar jarfile="${catalina-ws.jar}"
- manifest="${tomcat.tmp}/default.manifest">
- <fileset dir="${tomcat.classes}">
- <include name="org/apache/naming/factory/webservices/**" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <zipfileset file="res/META-INF/default.notice"
- fullpath="META-INF/NOTICE" />
- <zipfileset file="res/META-INF/default.license"
- fullpath="META-INF/LICENSE" />
- </jar>
+ description="Build web services extras package">
+
+ <mkdir dir="${tomcat.extras}/webservices"/>
+
+ <antcall target="downloadfile">
+ <param name="sourcefile" value="${jaxrpc-src.loc}"/>
+ <param name="destfile" value="${tomcat.extras}/webservices/jaxrpc.jar"/>
+ <param name="destdir" value="${tomcat.extras}/webservices/"/>
+ </antcall>
+
+ <antcall target="downloadfile">
+ <param name="sourcefile" value="${wsdl4j-src.loc}"/>
+ <param name="destfile" value="${tomcat.extras}/webservices/wsdl4j.jar"/>
+ <param name="destdir" value="${tomcat.extras}/webservices/"/>
+ </antcall>
+
+ <!-- Classpath -->
+ <path id="tomcat.webservices.classpath">
+ <pathelement path="${tomcat.classpath}"/>
+ <fileset dir="${tomcat.extras}/webservices">
+ <include name="jaxrpc.jar"/>
+ <include name="wsdl4j.jar"/>
+ </fileset>
+ </path>
+
+ <!-- Compile internal server components -->
+ <javac srcdir="java" destdir="${tomcat.classes}"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ source="${compile.source}"
+ optimize="${compile.optimize}"
+ encoding="ISO-8859-1">
+ <classpath refid="tomcat.webservices.classpath" />
+ <include name="org/apache/naming/factory/webservices/**" />
+ </javac>
+
+ <!-- Catalina Main JAR File -->
+ <jar jarfile="${catalina-ws.jar}"
+ manifest="${tomcat.tmp}/default.manifest">
+ <fileset dir="${tomcat.classes}">
+ <include name="org/apache/naming/factory/webservices/**" />
+ <!-- Javadoc and i18n exclusions -->
+ <exclude name="**/package.html" />
+ <exclude name="**/LocalStrings_*" />
+ </fileset>
+ <zipfileset file="res/META-INF/default.notice"
+ fullpath="META-INF/NOTICE" />
+ <zipfileset file="res/META-INF/default.license"
+ fullpath="META-INF/LICENSE" />
+ </jar>
<antcall target="md5sum">
<param name="file" value="${catalina-ws.jar}" />
</antcall>
</target>
<target name="jmx-remote" depends="prepare"
- description="Build JMX remote extras package">
+ description="Build JMX remote extras package">
<!-- Create the JAR file -->
<jar jarfile="${catalina-jmx-remote.jar}"
- manifest="${tomcat.tmp}/default.manifest" >
+ manifest="${tomcat.tmp}/default.manifest" >
<fileset dir="${tomcat.classes}">
<include name="org/apache/catalina/mbeans/JmxRemote*" />
</fileset>
<param name="file" value="${catalina-jmx-remote.jar}" />
</antcall>
</target>
-
+
<target name="extras" depends="prepare,commons-logging,webservices,jmx-remote"
- description="Build all extras packages">
+ description="Build all extras packages">
</target>
<target name="embed" depends="extras"
- description="Embedded packaging for those extras that can use it">
+ description="Embedded packaging for those extras that can use it">
<jar jarfile="${tomcat-embed-log4j.jar}"
manifest="${tomcat.tmp}/default.manifest" >
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging-version}-src/target/classes">
- <include name="org/apache/juli/logging/*.class" />
- <include name="org/apache/juli/logging/impl/*.class" />
+ <include name="org/apache/juli/logging/*.class" />
+ <include name="org/apache/juli/logging/impl/*.class" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
<mkdir dir="${destdir}" />
<get src="${sourcefile}" dest="${destfile}" />
</target>
-
+
<target name="downloadgz" unless="exist" depends="setproxy,testexist">
<!-- Download and extract the package -->
<get src="${sourcefile}" dest="${base.path}/file.tar.gz" />