Skip to content

Commit

Permalink
- Renamed javadocs target to javadoc.
Browse files Browse the repository at this point in the history
- Linked javadoc to JDK API, Velocity API and Servlet API.
- Don't copy TLD files to dist anymore, they are included in sitemesh-?.jar
  • Loading branch information
mbogaert committed Apr 12, 2004
1 parent dd02271 commit 981cb71
Showing 1 changed file with 81 additions and 79 deletions.
160 changes: 81 additions & 79 deletions build.xml
Expand Up @@ -6,145 +6,147 @@
<!-- Classpath -->
<path id="cp">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
<include name="**/*.jar"/>
</fileset>
</path>

<target name="init">
<tstamp />
<tstamp/>
</target>

<target name="compile" depends="init">
<mkdir dir="${build.dir}/classes" />
<mkdir dir="${build.dir}/classes"/>

<javac destdir="${build.dir}/classes"
classpathref="cp"
optimize="${compile.optimize}"
debug="${compile.debug}"
nowarn="${compile.nowarn}"
deprecation="${compile.deprecation}"
>
classpathref="cp"
optimize="${compile.optimize}"
debug="${compile.debug}"
nowarn="${compile.nowarn}"
deprecation="${compile.deprecation}"
>

<src path="${java.dir}"/>
<src path="${java.dir}"/>

</javac>
</target>

<target name="javadocs" depends="init" description="Generates JavaDoc">
<target name="javadoc" depends="init" description="Generates JavaDoc">
<mkdir dir="${dist.dir}/docs/api"/>

<javadoc sourcepath="${java.dir}"
destdir="${dist.dir}/docs/api"
stylesheetfile="${docs.dir}/api.css"
packagenames="com.opensymphony.*"
classpathref="cp"
author="true"
version="true"
private="true"
use="true"
windowTitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
footer="&lt;a href=&quot;http://www.opensymphony.com/sitemesh/&quot;&gt;www.opensymphony.com/sitemesh/&lt;/a&gt;"
/>
destdir="${dist.dir}/docs/api"
stylesheetfile="${docs.dir}/api.css"
packagenames="com.opensymphony.*"
classpathref="cp"
author="true"
version="true"
private="true"
use="true"
windowTitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
footer="&lt;a href=&quot;http://www.opensymphony.com/sitemesh/&quot;&gt;www.opensymphony.com/sitemesh/&lt;/a&gt;">

<link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
<link href="http://java.sun.com/products/servlet/2.3/javadoc/"/>
<link href="http://jakarta.apache.org/velocity/api/"/>
<link href="http://jakarta.apache.org/velocity/tools/javadoc/"/>

</javadoc>
</target>

<target name="docs" depends="javadocs">
<target name="docs" depends="javadoc">
<copy todir="${dist.dir}/docs">
<fileset dir="${docs.dir}" excludes="*.css"/>
</copy>

<mkdir dir="${dist.dir}/docs/dtd"/>
<copy todir="${dist.dir}/docs" file="README.txt"/>
<copy todir="${dist.dir}/docs/dtd">
<fileset dir="${etc.dir}/dtd" />
<fileset dir="${etc.dir}/dtd"/>
</copy>
<replace dir="${dist.dir}/docs" token="@VERSION@" value="${version}"/>

<replace dir="${dist.dir}/docs" token="@VERSION@" value="${version}"/>
</target>

<target name="jar" depends="compile">
<mkdir dir="${dist.dir}" />
<mkdir dir="${dist.dir}"/>

<copy todir="${build.dir}/classes/com/opensymphony/module/sitemesh/factory" file="${java.dir}/com/opensymphony/module/sitemesh/factory/sitemesh-default.xml"/>
<jar jarfile="${dist.dir}/${name}-${version}.jar" basedir="${build.dir}/classes">
<metainf dir="${tld.dir}/jsp1.2" includes="*.tld" />
<metainf dir="${tld.dir}/jsp1.2" includes="*.tld"/>
</jar>
<copy todir="${dist.dir}">
<fileset dir="${tld.dir}" includes="*.tld" />
</copy>
</target>

<target name="blank" depends="jar" description="Builds simple web-app to get started with SiteMesh">
<mkdir dir="${dist.dir}" />
<mkdir dir="${dist.dir}"/>
<war warfile="${dist.dir}/${name}-blank.war" webxml="${blank.dir}/WEB-INF/web.xml">
<fileset dir="${blank.dir}">
<exclude name="WEB-INF/web.xml" />
</fileset>
<exclude name="WEB-INF/web.xml"/>
</fileset>
<lib dir="${dist.dir}">
<include name="${name}-${version}.jar" />
<include name="${name}-${version}.jar"/>
</lib>
</war>
</target>

<target name="example" depends="jar" description="Builds sample web-app">
<!-- Temporary work-around for the Tomcat bug. Changes all html files to jsp. -->
<mkdir dir="${build.dir}/example-temp" />
<copy todir="${build.dir}/example-temp">
<fileset dir="${example.dir}"/>
</copy>
<move todir="${build.dir}/example-temp">
<fileset dir="${build.dir}/example-temp"/>
<mapper type="glob" from="*.html" to="*.jsp"/>
</move>
<replace dir="${build.dir}/example-temp" >
<replacefilter token=".html" value=".jsp"/>
</replace>

<mkdir dir="${dist.dir}" />
<war warfile="${dist.dir}/${name}-example.war" webxml="${example.dir}/WEB-INF/web.xml">
<!-- Temporary work-around for the Tomcat bug. Changes all html files to jsp. -->
<mkdir dir="${build.dir}/example-temp"/>
<copy todir="${build.dir}/example-temp">
<fileset dir="${example.dir}"/>
</copy>
<move todir="${build.dir}/example-temp">
<fileset dir="${build.dir}/example-temp"/>
<mapper type="glob" from="*.html" to="*.jsp"/>
</move>
<replace dir="${build.dir}/example-temp">
<replacefilter token=".html" value=".jsp"/>
</replace>

<mkdir dir="${dist.dir}"/>

<war warfile="${dist.dir}/${name}-example.war" webxml="${example.dir}/WEB-INF/web.xml">
<fileset dir="${build.dir}/example-temp">
<exclude name="WEB-INF/web.xml" />
<exclude name="WEB-INF/web.xml"/>
</fileset>
<lib dir="${dist.dir}">
<include name="${name}-${version}.jar" />
<include name="${name}-${version}.jar"/>
</lib>
<lib dir="${lib.dir}">
<include name="commons-*.jar" />
<include name="velocity-*.jar" />
<include name="commons-*.jar"/>
<include name="velocity-*.jar"/>
</lib>
</war>
</target>

<target name="changelog" depends="init" description="Generates a changelog for the last 80 days">
<mkdir dir="${build.dir}" />
<cvschangelog dir="." destfile="${build.dir}/changelog.xml" daysinpast="80">
<user displayname="Hani Suleiman" userid="hani"/>
<user displayname="Mathias Bogaert" userid="mbogaert"/>
<user displayname="Scott Farquhar" userid="farkas"/>
<user displayname="Mike Cannon-Brookes" userid="rebelutionary"/>
</cvschangelog>
<mkdir dir="${dist.dir}/docs" />
<style in="${build.dir}/changelog.xml" out="${dist.dir}/docs/changelog.html" style="${ant.home}/etc/changelog.xsl">
<param name="title" expression="SiteMesh changelog for the last 80 days"/>
<param name="module" expression="sitemesh"/>
<param name="cvsweb" expression="https://sitemesh.dev.java.net/source/browse/"/>
<mkdir dir="${build.dir}"/>

<cvschangelog dir="." destfile="${build.dir}/changelog.xml" daysinpast="80">
<user displayname="Hani Suleiman" userid="hani"/>
<user displayname="Mathias Bogaert" userid="mbogaert"/>
<user displayname="Scott Farquhar" userid="farkas"/>
<user displayname="Mike Cannon-Brookes" userid="rebelutionary"/>
</cvschangelog>

<mkdir dir="${dist.dir}/docs"/>

<style in="${build.dir}/changelog.xml" out="${dist.dir}/docs/changelog.html" style="${ant.home}/etc/changelog.xsl">
<param name="title" expression="SiteMesh changelog for the last 80 days"/>
<param name="module" expression="sitemesh"/>
<param name="cvsweb" expression="https://sitemesh.dev.java.net/source/browse/"/>
</style>
</target>

</target>

<target name="dist" depends="clean, docs, jar, blank, example" description="Builds distribution archives">
<zip zipfile="${dist.dir}/${name}-${version}-sources.zip"
basedir="${basedir}"
excludes="${dist.dir}/**, ${build.dir}/**, **/*.log"
/>
basedir="${basedir}"
excludes="${dist.dir}/**, ${build.dir}/**, **/*.log"
/>
</target>

<target name="clean" description="Removes all build artifacts">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
</project>

0 comments on commit 981cb71

Please sign in to comment.