jstrachan 01/07/23 11:53:05
Modified: . common.xml
Log:
Tidied the build process for examples. Firstly allowed JSP examples to exist inside
a directory, so generate the html source recursively. Also now the search and replace
of the generated source html now encodes & properly. Finally index.jsp does not create
index.html source code (as many browsers try this page first)
Revision Changes Path
1.19 +352 -346 jakarta-taglibs/common.xml
Index: common.xml
===================================================================
RCS file: /home/cvs/jakarta-taglibs/common.xml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- common.xml 2001/07/13 23:19:47 1.18
+++ common.xml 2001/07/23 18:53:05 1.19
@@ -1,346 +1,352 @@
-<!-- ===================================================================== -->
-<!-- standard Ant targets for custom tag libraries -->
-<!-- note: this is not a proper xml file (there is no root element) -->
-<!-- it is intended to be imported from the taglib build.xml -->
-<!-- ===================================================================== -->
-
- <!-- =================================================================== -->
- <!-- Properties setup -->
- <!-- =================================================================== -->
- <property file="../build.properties"/>
- <property file="../common.properties"/>
- <property name="classpath" value="${servlet.jar}" />
-
- <!-- =================================================================== -->
- <!-- Compile the library as well as the associated applications -->
- <!-- =================================================================== -->
- <target name="main" depends="library,documentation,examples">
- <antcall target="${main.pre}"/>
- <antcall target="${main.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Create the entire set of distribution files -->
- <!-- =================================================================== -->
- <target name="dist" depends="library-dist,documentation-dist,examples-dist">
- <antcall target="${dist.pre}"/>
- <antcall target="${dist.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Default pre & post actions -->
- <!-- =================================================================== -->
- <target name="default.pre"/>
- <target name="default.post"/>
-
- <!-- =================================================================== -->
- <!-- Check required components (xerces and xalan) -->
- <!-- =================================================================== -->
- <target name="checkRequirements">
- <antcall target="${checkRequirements.pre}"/>
- <antcall target="checkRequiredFile">
- <param name="file" value="${servlet.jar}"/>
- <param name="fail.message" value="a jar file containing the servlet
specification classes is required to compile jakarta taglibs. please set the
servlet.jar property servlet.jar path in your build.properties file and ensure that
the file exists"/>
- </antcall>
-<!--
- <antcall target="checkRequiredClass">
- <param name="class" value="org.apache.xerces.framework.XMLParser"/>
- <param name="fail.message" value="xerces is required for the <style>
task in the "documentation" target. please install xerces.jar in
ANT_HOME/lib"/>
- </antcall>
- <antcall target="checkRequiredClass">
- <param name="class" value="org.apache.xalan.xslt.Stylesheet"/>
- <param name="fail.message" value="xalan is required for the <style>
task in the "documentation" target. please install xalan.jar in
ANT_HOME/lib"/>
- </antcall>
--->
- <antcall target="${checkRequirements.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Prepare the build and dist directories -->
- <!-- =================================================================== -->
- <target name="prepare" depends="checkRequirements">
- <antcall target="${prepare.pre}"/>
- <!-- Set up build directories -->
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.doc}"/>
- <mkdir dir="${build.doc}/javadoc"/>
- <mkdir dir="${build.doc}/WEB-INF"/>
- <mkdir dir="${build.doc}/WEB-INF/classes"/>
- <mkdir dir="${build.doc}/WEB-INF/lib"/>
- <mkdir dir="${build.examples}"/>
- <mkdir dir="${build.examples}/WEB-INF"/>
- <mkdir dir="${build.examples}/WEB-INF/classes"/>
- <mkdir dir="${build.examples}/WEB-INF/lib"/>
- <mkdir dir="${build.library}"/>
- <mkdir dir="${build.library}/META-INF"/>
- <!-- Set up distribution directory -->
- <mkdir dir="${dist.dir}"/>
- <mkdir dir="${dist.library}"/>
- <!-- See if the examples dir has any source to compile -->
- <available file="${examples.src}/src" property="examples.src.present"/>
- <!-- See if we should use template to generate documentation and tld -->
- <available file="xml/${taglib.name}.xml" property="template.present"/>
- <!-- See if there is any documentation web app documents -->
- <available file="${doc.src}/web" property="documentation.present"/>
- <antcall target="${prepare.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Assemble the documentation application -->
- <!-- =================================================================== -->
- <target name="documentation" depends="prepare">
- <antcall target="${documentation.pre}"/>
- <antcall target="template-docs"/>
- <copy todir="${build.doc}/WEB-INF">
- <fileset dir="${doc.src}/conf"/>
- </copy>
- <!-- intro.xml isn't part of the documentation application,
- this is just a handy place to build it for the web site. -->
- <style in="${xml.src}/intro.xml"
- destdir="${build.doc}"
- out="${build.doc}/intro.html"
- style="${taglibs.xsl}">
- <param name="prefix" expression="../../"/>
- </style>
- <antcall target="copy.documentation"/>
- <javadoc packagenames="org.apache.taglibs.*"
- sourcepath="${library.src}"
- classpath="${classpath}"
- destdir="${build.doc}/javadoc"
- author="true"
- version="true"
- use="true"
- windowtitle="Jakarta '${taglib.name}' custom tag library API"
- doctitle="Jakarta '${taglib.name}' custom tag library"
- bottom="Copyright © 2000 Apache Software Foundation. All Rights
Reserved."/>
- <antcall target="${documentation.post}"/>
- </target>
-
- <target name="copy.documentation" if="documentation.present">
- <copy todir="${build.doc}">
- <fileset dir="${doc.src}/web"/>
- </copy>
- </target>
-
- <!-- =================================================================== -->
- <!-- Assemble the examples application -->
- <!-- =================================================================== -->
- <target name="examples" depends="compile-examples,library-dist">
- <antcall target="${examples.pre}"/>
- <copy toDir="${build.examples}/WEB-INF">
- <fileset dir="${examples.src}/conf"/>
- </copy>
- <copy toDir="${build.examples}">
- <fileset dir="${examples.src}/web"/>
- </copy>
- <copy file="${dist.library}/${taglib.name}.jar"
- toFile="${build.examples}/WEB-INF/lib/${taglib.name}.jar"/>
- <!-- Copy the .jsp files as .txt files -->
- <copy todir="${build.examples}" >
- <fileset dir="${examples.src}/web" includes="*.jsp"/>
- <mapper type="glob" from="*.jsp" to="*.txt"/>
- </copy>
- <!-- now escape the .txt files -->
- <replace dir="${build.examples}">
- <include name="**/*.txt"/>
- <replacetoken><![CDATA[<]]></replacetoken>
- <replacevalue><![CDATA[<]]></replacevalue>
- </replace>
- <replace dir="${build.examples}">
- <include name="**/*.txt"/>
- <replacetoken><![CDATA[>]]></replacetoken>
- <replacevalue><![CDATA[>]]></replacevalue>
- </replace>
- <antcall target="examples.html"/>
- <antcall target="${examples.pre}"/>
- </target>
-
- <!-- Generates example html files from the escaped txt files -->
- <target name="examples.html" unless="gen-docs.present">
- <!-- now format the .txt files as an xml file -->
- <replace dir="${build.examples}">
- <include name="**/*.txt"/>
- <replacetoken><![CDATA[<!doctype]]></replacetoken>
- <replacevalue><![CDATA[<?xml version="1.0" ?>
-
-<document>
-<!doctype]]></replacevalue>
- </replace>
- <replace dir="${build.examples}">
- <include name="**/*.txt"/>
- <replacetoken><![CDATA[</html>]]></replacetoken>
- <replacevalue><![CDATA[</html></document>]]></replacevalue>
- </replace>
- <!-- now style the .txt files as .html files -->
- <style basedir="${build.examples}"
- destdir="${build.examples}"
- includes="**/*.txt"
- style="../../../src/taglib/examples.xsl"/>
- <!-- delete the temporary text files -->
- <delete>
- <fileset dir="${build.examples}" includes="**/*.txt"/>
- </delete>
- </target>
-
- <!-- =================================================================== -->
- <!-- Compile the examples application -->
- <!-- =================================================================== -->
- <target name="compile-examples" depends="prepare" if="examples.src.present">
- <antcall target="${compile-examples.pre}"/>
- <javac srcdir="${examples.src}/src"
- destdir="${build.examples}/WEB-INF/classes"
- classpath="${classpath}" debug="on"/>
- <copy todir="${build.examples}/WEB-INF/classes">
- <fileset dir="${examples.src}/src">
- <include name="**/*.properties"/>
- </fileset>
- </copy>
- <antcall target="${compile-examples.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Compile the tag library itself -->
- <!-- =================================================================== -->
- <target name="library" depends="prepare">
- <antcall target="${library.pre}"/>
- <antcall target="template-tld"/>
- <javac srcdir="${library.src}" destdir="${build.library}"
- classpath="${classpath}" debug="on"/>
- <antcall target="${library.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Create the documentation WAR file -->
- <!-- =================================================================== -->
- <target name="documentation-dist" depends="documentation">
- <antcall target="${documentation-dist.pre}"/>
- <jar jarfile="${dist.doc}" basedir="${build.doc}" excludes="intro.html"/>
- <mkdir dir="${taglibs.doc}"/>
- <copy todir="${taglibs.doc}">
- <fileset dir="${build.doc}">
- <exclude name="WEB-INF"/>
- </fileset>
- </copy>
- <antcall target="${documentation-dist.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Create the examples WAR file -->
- <!-- =================================================================== -->
- <target name="examples-dist" depends="examples">
- <antcall target="${examples-dist.pre}"/>
- <jar jarfile="${dist.examples}" basedir="${build.examples}"/>
- <antcall target="${examples-dist.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Create the library JAR file -->
- <!-- =================================================================== -->
- <target name="library-dist" depends="library">
- <antcall target="${library-dist.pre}"/>
- <copy file="${examples.tld}" toFile="${library.tld}"/>
- <jar jarfile="${dist.library}/${taglib.name}.jar"
- basedir="${build.library}"/>
- <copy file="${examples.tld}" toFile="${dist.tld}"/>
- <antcall target="${library-dist.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Delete output directories and files so we can build from scratch -->
- <!-- =================================================================== -->
- <target name="clean">
- <antcall target="${clean.pre}"/>
- <delete dir="${build.dir}/${taglib.name}"/>
- <delete dir="${dist.dir}/${taglib.name}"/>
- <antcall target="${clean.post}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Scripts used with antcall for checking for required classes or jars -->
- <!-- Must provide "class" or "file" and "fail.message" parameters -->
- <!-- =================================================================== -->
- <target name="checkRequiredClass">
- <available classname="${class}" property="requirement.satisfied"/>
- <antcall target="checkRequired.fail"/>
- </target>
- <target name="checkRequiredFile">
- <available file="${file}" property="requirement.satisfied"/>
- <antcall target="checkRequired.fail"/>
- </target>
- <target name="checkRequired.fail" unless="requirement.satisfied">
- <fail message="${fail.message}"/>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Generate TLD and HTML docs from XML files in ${xml.src} -->
- <!-- based on the new src/taglib directory templates -->
- <!-- =================================================================== -->
-
- <!-- In the below styles we are transforming individual files,
- the destdir shouldn't be necessary, but ant complains if
- it isn't there.
- -->
-
- <target name="template-tld" depends="prepare" if="template.present">
- <antcall target="template-tld11"/>
- <antcall target="template-tld12"/>
- <!-- Remove call to gen-tld once taglibs converted to new template -->
- <antcall target="gen-tld"/>
- </target>
-
- <target name="template-tld11" depends="prepare" unless="gen-docs.present">
- <style in="${xml.src}/${taglib.name}.xml"
- destdir="${build.examples}/WEB-INF"
- out="${build.examples}/WEB-INF/${taglib.name}.tld"
- style="${tld11.xsl}"/>
- </target>
-
- <target name="template-tld12" depends="prepare" if="jsp12.present">
- <style in="${xml.src}/${taglib.name}.xml"
- destdir="${build.examples}/WEB-INF"
- out="${build.examples}/WEB-INF/${taglib.name}.tld"
- style="${tld12.xsl}"/>
- </target>
-
- <target name="template-docs" depends="prepare" if="template.present">
- <style in="${xml.src}/${taglib.name}.xml"
- destdir="${build.doc}"
- out="${build.doc}/index.html"
- style="${taglib-doc.xsl}"/>
- <style in="${xml.src}/${taglib.name}.xml"
- destdir="${build.doc}"
- out="${build.doc}/changes.html"
- style="${changes-doc.xsl}"/>
- <!-- Remove call to gen-docs once taglibs converted to new template -->
- <antcall target="gen-docs"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Generate TLD and HTML docs from XML files in ${xml.src} -->
- <!-- using the old taglib-doc-kit, remove this after taglibs -->
- <!-- have been converted to new src/taglib template. -->
- <!-- =================================================================== -->
-
- <!-- In the below styles we are transforming individual files,
- the destdir shouldn't be necessary, but ant complains if
- it isn't there.
- -->
-
- <target name="gen-tld" depends="prepare" if="gen-docs.present">
- <style in="${xml.src}/${taglib.name}.xml"
- destdir="${build.examples}/WEB-INF"
- out="${build.examples}/WEB-INF/${taglib.name}.tld"
- style="../taglib-doc-kit/xml/tld.xsl"/>
- </target>
-
- <target name="gen-docs" depends="prepare" if="gen-docs.present">
- <style in="${xml.src}/${taglib.name}.xml"
- destdir="${build.doc}"
- out="${build.doc}/index.html"
- style="../taglib-doc-kit/xml/taglib-doc.xsl"/>
- <style in="doc/web/changes.xml"
- destdir="${build.doc}"
- out="${build.doc}/changes.html"
- style="${taglibs.xsl}"/>
- </target>
+<!-- ===================================================================== -->
+<!-- standard Ant targets for custom tag libraries -->
+<!-- note: this is not a proper xml file (there is no root element) -->
+<!-- it is intended to be imported from the taglib build.xml -->
+<!-- ===================================================================== -->
+
+ <!-- =================================================================== -->
+ <!-- Properties setup -->
+ <!-- =================================================================== -->
+ <property file="../build.properties"/>
+ <property file="../common.properties"/>
+ <property name="classpath" value="${servlet.jar}" />
+
+ <!-- =================================================================== -->
+ <!-- Compile the library as well as the associated applications -->
+ <!-- =================================================================== -->
+ <target name="main" depends="library,documentation,examples">
+ <antcall target="${main.pre}"/>
+ <antcall target="${main.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Create the entire set of distribution files -->
+ <!-- =================================================================== -->
+ <target name="dist" depends="library-dist,documentation-dist,examples-dist">
+ <antcall target="${dist.pre}"/>
+ <antcall target="${dist.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Default pre & post actions -->
+ <!-- =================================================================== -->
+ <target name="default.pre"/>
+ <target name="default.post"/>
+
+ <!-- =================================================================== -->
+ <!-- Check required components (xerces and xalan) -->
+ <!-- =================================================================== -->
+ <target name="checkRequirements">
+ <antcall target="${checkRequirements.pre}"/>
+ <antcall target="checkRequiredFile">
+ <param name="file" value="${servlet.jar}"/>
+ <param name="fail.message" value="a jar file containing the servlet
specification classes is required to compile jakarta taglibs. please set the
servlet.jar property servlet.jar path in your build.properties file and ensure that
the file exists"/>
+ </antcall>
+<!--
+ <antcall target="checkRequiredClass">
+ <param name="class" value="org.apache.xerces.framework.XMLParser"/>
+ <param name="fail.message" value="xerces is required for the <style>
task in the "documentation" target. please install xerces.jar in
ANT_HOME/lib"/>
+ </antcall>
+ <antcall target="checkRequiredClass">
+ <param name="class" value="org.apache.xalan.xslt.Stylesheet"/>
+ <param name="fail.message" value="xalan is required for the <style>
task in the "documentation" target. please install xalan.jar in
ANT_HOME/lib"/>
+ </antcall>
+-->
+ <antcall target="${checkRequirements.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Prepare the build and dist directories -->
+ <!-- =================================================================== -->
+ <target name="prepare" depends="checkRequirements">
+ <antcall target="${prepare.pre}"/>
+ <!-- Set up build directories -->
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.doc}"/>
+ <mkdir dir="${build.doc}/javadoc"/>
+ <mkdir dir="${build.doc}/WEB-INF"/>
+ <mkdir dir="${build.doc}/WEB-INF/classes"/>
+ <mkdir dir="${build.doc}/WEB-INF/lib"/>
+ <mkdir dir="${build.examples}"/>
+ <mkdir dir="${build.examples}/WEB-INF"/>
+ <mkdir dir="${build.examples}/WEB-INF/classes"/>
+ <mkdir dir="${build.examples}/WEB-INF/lib"/>
+ <mkdir dir="${build.library}"/>
+ <mkdir dir="${build.library}/META-INF"/>
+ <!-- Set up distribution directory -->
+ <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${dist.library}"/>
+ <!-- See if the examples dir has any source to compile -->
+ <available file="${examples.src}/src" property="examples.src.present"/>
+ <!-- See if we should use template to generate documentation and tld -->
+ <available file="xml/${taglib.name}.xml" property="template.present"/>
+ <!-- See if there is any documentation web app documents -->
+ <available file="${doc.src}/web" property="documentation.present"/>
+ <antcall target="${prepare.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Assemble the documentation application -->
+ <!-- =================================================================== -->
+ <target name="documentation" depends="prepare">
+ <antcall target="${documentation.pre}"/>
+ <antcall target="template-docs"/>
+ <copy todir="${build.doc}/WEB-INF">
+ <fileset dir="${doc.src}/conf"/>
+ </copy>
+ <!-- intro.xml isn't part of the documentation application,
+ this is just a handy place to build it for the web site. -->
+ <style in="${xml.src}/intro.xml"
+ destdir="${build.doc}"
+ out="${build.doc}/intro.html"
+ style="${taglibs.xsl}">
+ <param name="prefix" expression="../../"/>
+ </style>
+ <antcall target="copy.documentation"/>
+ <javadoc packagenames="org.apache.taglibs.*"
+ sourcepath="${library.src}"
+ classpath="${classpath}"
+ destdir="${build.doc}/javadoc"
+ author="true"
+ version="true"
+ use="true"
+ windowtitle="Jakarta '${taglib.name}' custom tag library API"
+ doctitle="Jakarta '${taglib.name}' custom tag library"
+ bottom="Copyright © 2000 Apache Software Foundation. All Rights
Reserved."/>
+ <antcall target="${documentation.post}"/>
+ </target>
+
+ <target name="copy.documentation" if="documentation.present">
+ <copy todir="${build.doc}">
+ <fileset dir="${doc.src}/web"/>
+ </copy>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Assemble the examples application -->
+ <!-- =================================================================== -->
+ <target name="examples" depends="compile-examples,library-dist">
+ <antcall target="${examples.pre}"/>
+ <copy toDir="${build.examples}/WEB-INF">
+ <fileset dir="${examples.src}/conf"/>
+ </copy>
+ <copy toDir="${build.examples}">
+ <fileset dir="${examples.src}/web"/>
+ </copy>
+ <copy file="${dist.library}/${taglib.name}.jar"
+ toFile="${build.examples}/WEB-INF/lib/${taglib.name}.jar"/>
+ <!-- Copy the .jsp files as .txt files -->
+ <copy todir="${build.examples}" >
+ <fileset dir="${examples.src}/web" includes="**/*.jsp" excludes="index.jsp"/>
+ <mapper type="glob" from="*.jsp" to="*.txt"/>
+ </copy>
+ <!-- now escape the .txt files -->
+ <replace dir="${build.examples}">
+ <include name="**/*.txt"/>
+ <replacetoken><![CDATA[&]]></replacetoken>
+ <replacevalue><![CDATA[&]]></replacevalue>
+ </replace>
+ <replace dir="${build.examples}">
+ <include name="**/*.txt"/>
+ <replacetoken><![CDATA[<]]></replacetoken>
+ <replacevalue><![CDATA[<]]></replacevalue>
+ </replace>
+ <replace dir="${build.examples}">
+ <include name="**/*.txt"/>
+ <replacetoken><![CDATA[>]]></replacetoken>
+ <replacevalue><![CDATA[>]]></replacevalue>
+ </replace>
+ <antcall target="examples.html"/>
+ <antcall target="${examples.pre}"/>
+ </target>
+
+ <!-- Generates example html files from the escaped txt files -->
+ <target name="examples.html" unless="gen-docs.present">
+ <!-- now format the .txt files as an xml file -->
+ <replace dir="${build.examples}">
+ <include name="**/*.txt"/>
+ <replacetoken><![CDATA[<!doctype]]></replacetoken>
+ <replacevalue><![CDATA[<?xml version="1.0" ?>
+
+<document>
+<!doctype]]></replacevalue>
+ </replace>
+ <replace dir="${build.examples}">
+ <include name="**/*.txt"/>
+ <replacetoken><![CDATA[</html>]]></replacetoken>
+ <replacevalue><![CDATA[</html></document>]]></replacevalue>
+ </replace>
+ <!-- now style the .txt files as .html files -->
+ <copy file="${taglib-doc.dir}/examples.xsl"
toFile="${build.examples}/_tmp_examples.xsl"/>
+ <style basedir="${build.examples}"
+ destdir="${build.examples}"
+ includes="**/*.txt"
+ style="_tmp_examples.xsl"/>
+ <!-- delete the temporary text files -->
+ <delete>
+ <fileset dir="${build.examples}" includes="**/*.txt, _tmp_examples.xsl"/>
+ </delete>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compile the examples application -->
+ <!-- =================================================================== -->
+ <target name="compile-examples" depends="prepare" if="examples.src.present">
+ <antcall target="${compile-examples.pre}"/>
+ <javac srcdir="${examples.src}/src"
+ destdir="${build.examples}/WEB-INF/classes"
+ classpath="${classpath}" debug="on"/>
+ <copy todir="${build.examples}/WEB-INF/classes">
+ <fileset dir="${examples.src}/src">
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+ <antcall target="${compile-examples.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compile the tag library itself -->
+ <!-- =================================================================== -->
+ <target name="library" depends="prepare">
+ <antcall target="${library.pre}"/>
+ <antcall target="template-tld"/>
+ <javac srcdir="${library.src}" destdir="${build.library}"
+ classpath="${classpath}" debug="on"/>
+ <antcall target="${library.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Create the documentation WAR file -->
+ <!-- =================================================================== -->
+ <target name="documentation-dist" depends="documentation">
+ <antcall target="${documentation-dist.pre}"/>
+ <jar jarfile="${dist.doc}" basedir="${build.doc}" excludes="intro.html"/>
+ <mkdir dir="${taglibs.doc}"/>
+ <copy todir="${taglibs.doc}">
+ <fileset dir="${build.doc}">
+ <exclude name="WEB-INF"/>
+ </fileset>
+ </copy>
+ <antcall target="${documentation-dist.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Create the examples WAR file -->
+ <!-- =================================================================== -->
+ <target name="examples-dist" depends="examples">
+ <antcall target="${examples-dist.pre}"/>
+ <jar jarfile="${dist.examples}" basedir="${build.examples}"/>
+ <antcall target="${examples-dist.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Create the library JAR file -->
+ <!-- =================================================================== -->
+ <target name="library-dist" depends="library">
+ <antcall target="${library-dist.pre}"/>
+ <copy file="${examples.tld}" toFile="${library.tld}"/>
+ <jar jarfile="${dist.library}/${taglib.name}.jar"
+ basedir="${build.library}"/>
+ <copy file="${examples.tld}" toFile="${dist.tld}"/>
+ <antcall target="${library-dist.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Delete output directories and files so we can build from scratch -->
+ <!-- =================================================================== -->
+ <target name="clean">
+ <antcall target="${clean.pre}"/>
+ <delete dir="${build.dir}/${taglib.name}"/>
+ <delete dir="${dist.dir}/${taglib.name}"/>
+ <antcall target="${clean.post}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Scripts used with antcall for checking for required classes or jars -->
+ <!-- Must provide "class" or "file" and "fail.message" parameters -->
+ <!-- =================================================================== -->
+ <target name="checkRequiredClass">
+ <available classname="${class}" property="requirement.satisfied"/>
+ <antcall target="checkRequired.fail"/>
+ </target>
+ <target name="checkRequiredFile">
+ <available file="${file}" property="requirement.satisfied"/>
+ <antcall target="checkRequired.fail"/>
+ </target>
+ <target name="checkRequired.fail" unless="requirement.satisfied">
+ <fail message="${fail.message}"/>
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- Generate TLD and HTML docs from XML files in ${xml.src} -->
+ <!-- based on the new src/taglib directory templates -->
+ <!-- =================================================================== -->
+
+ <!-- In the below styles we are transforming individual files,
+ the destdir shouldn't be necessary, but ant complains if
+ it isn't there.
+ -->
+
+ <target name="template-tld" depends="prepare" if="template.present">
+ <antcall target="template-tld11"/>
+ <antcall target="template-tld12"/>
+ <!-- Remove call to gen-tld once taglibs converted to new template -->
+ <antcall target="gen-tld"/>
+ </target>
+
+ <target name="template-tld11" depends="prepare" unless="gen-docs.present">
+ <style in="${xml.src}/${taglib.name}.xml"
+ destdir="${build.examples}/WEB-INF"
+ out="${build.examples}/WEB-INF/${taglib.name}.tld"
+ style="${tld11.xsl}"/>
+ </target>
+
+ <target name="template-tld12" depends="prepare" if="jsp12.present">
+ <style in="${xml.src}/${taglib.name}.xml"
+ destdir="${build.examples}/WEB-INF"
+ out="${build.examples}/WEB-INF/${taglib.name}.tld"
+ style="${tld12.xsl}"/>
+ </target>
+
+ <target name="template-docs" depends="prepare" if="template.present">
+ <style in="${xml.src}/${taglib.name}.xml"
+ destdir="${build.doc}"
+ out="${build.doc}/index.html"
+ style="${taglib-doc.xsl}"/>
+ <style in="${xml.src}/${taglib.name}.xml"
+ destdir="${build.doc}"
+ out="${build.doc}/changes.html"
+ style="${changes-doc.xsl}"/>
+ <!-- Remove call to gen-docs once taglibs converted to new template -->
+ <antcall target="gen-docs"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Generate TLD and HTML docs from XML files in ${xml.src} -->
+ <!-- using the old taglib-doc-kit, remove this after taglibs -->
+ <!-- have been converted to new src/taglib template. -->
+ <!-- =================================================================== -->
+
+ <!-- In the below styles we are transforming individual files,
+ the destdir shouldn't be necessary, but ant complains if
+ it isn't there.
+ -->
+
+ <target name="gen-tld" depends="prepare" if="gen-docs.present">
+ <style in="${xml.src}/${taglib.name}.xml"
+ destdir="${build.examples}/WEB-INF"
+ out="${build.examples}/WEB-INF/${taglib.name}.tld"
+ style="../taglib-doc-kit/xml/tld.xsl"/>
+ </target>
+
+ <target name="gen-docs" depends="prepare" if="gen-docs.present">
+ <style in="${xml.src}/${taglib.name}.xml"
+ destdir="${build.doc}"
+ out="${build.doc}/index.html"
+ style="../taglib-doc-kit/xml/taglib-doc.xsl"/>
+ <style in="doc/web/changes.xml"
+ destdir="${build.doc}"
+ out="${build.doc}/changes.html"
+ style="${taglibs.xsl}"/>
+ </target>