cvs commit: jakarta-alexandria build.xml
[email protected] 15 Apr 2003 16:14:23 -0000
| Newsgroups | gmane.comp.jakarta.alexandria.devel |
|---|---|
| Message-ID | <[email protected]> |
nicolaken 2003/04/15 09:14:23
Modified: . build.xml
Log:
Differentiate between build (this project) and target (the project being
documented). Add a project dir and name property.
Revision Changes Path
1.25 +59 -47 jakarta-alexandria/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-alexandria/build.xml,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- build.xml 11 Apr 2003 15:32:51 -0000 1.24
+++ build.xml 15 Apr 2003 16:14:23 -0000 1.25
@@ -2,22 +2,28 @@
<project
name="jakarta-alexandria" default="dist" basedir=".">
+ <property name="project.name" value="project" />
+ <property name="project.dir" value="." />
+
+ <property name="java.src" value="${project.dir}/src/java" />
+ <property name="ant.src" value="${project.dir}/build.xml" />
+ <property name="js.src" value="./src/test/resources/jsdoc" />
+
<property name="src" value="./src/java" />
<property name="resources" value="./src/resources" />
<property name="build" value="./build" />
+ <property name="build.classes" value="${build}/classes" />
+ <property name="target" value="${build}/${project.name}" />
<property name="dist" value="./dist" />
- <property name="build.javasrc" value="${build}/javasrc" />
- <property name="build.javadoc" value="${build}/javadoc" />
- <property name="build.xml" value="${build}/xml" />
- <property name="build.dot" value="${build}/dot" />
- <property name="build.uml" value="${build}/uml" />
- <property name="build.jsdoc" value="${build}/jsdoc" />
- <property name="build.vizant" value="${build}/vizant" />
+ <property name="target.javasrc" value="${target}/javasrc" />
+ <property name="target.javadoc" value="${target}/javadoc" />
+ <property name="target.xml" value="${target}/xml" />
+ <property name="target.dot" value="${target}/dot" />
+ <property name="target.uml" value="${target}/uml" />
+ <property name="target.jsdoc" value="${target}/jsdoc" />
+ <property name="target.vizant" value="${target}/vizant" />
- <property name="java.src" value="./src/java" />
- <property name="ant.src" value="build.xml" />
- <property name="js.src" value="./src/test/resources/jsdoc" />
<path id="lib.classpath">
<fileset dir="lib">
@@ -34,13 +40,13 @@
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir
- dir="${build}/classes" />
+ dir="${build.classes}" />
</target>
<target name="compile" depends="init">
-<!-- Compile the java code from ${src} into ${build} -->
+<!-- Compile the java code from ${src} into ${target} -->
<javac srcdir="${src}"
- destdir="${build}/classes"
+ destdir="${build.classes}"
classpathref="lib.classpath" />
</target>
@@ -48,14 +54,14 @@
<!-- Create destination directory -->
<mkdir dir="${dist}" />
-<!-- Put everything in ${build} into the jakarta-alexandria.jar file -->
+<!-- Put everything in ${target} into the jakarta-alexandria.jar file -->
<jar jarfile="${dist}/jakarta-alexandria.jar"
- basedir="${build}/classes" />
+ basedir="${build.classes}" />
</target>
<target name="clean">
-<!-- Delete the ${build} and ${dist} directory trees -->
+<!-- Delete the ${target} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
@@ -64,7 +70,13 @@
<target name="all"
description="create all possibkle docs for this project"
- depends="javasrc, jsdoc, xml, uml, javadoc, vizant"/>
+ depends="javasrc, jsdoc, xml, uml, javadoc, vizant">
+
+ <copy todir="${target}">
+ <fileset dir="${resources}/common" casesensitive="yes"/>
+ </copy>
+
+ </target>
<!--
@@ -76,7 +88,7 @@
<target name="javasrc" depends="dist">
- <mkdir dir="${build.javasrc}" />
+ <mkdir dir="${target.javasrc}" />
<java classname="org.apache.alexandria.javasrc.Pass1"
fork="true"
@@ -84,7 +96,7 @@
failonerror="true">
<sysproperty key="recurse" value="true" />
<sysproperty key="title" value="Java Code Documentation" />
- <sysproperty key="outdir" path="${build.javasrc}" />
+ <sysproperty key="outdir" path="${target.javasrc}" />
<arg value="${java.src}" />
<classpath>
<fileset dir="${dist}">
@@ -102,7 +114,7 @@
failonerror="true">
<sysproperty key="recurse" value="true" />
<sysproperty key="title" value="Java Code Documentation" />
- <sysproperty key="outdir" path="${build.javasrc}" />
+ <sysproperty key="outdir" path="${target.javasrc}" />
<arg value="${java.src}" />
<classpath>
<fileset dir="${dist}">
@@ -115,14 +127,14 @@
</java>
<copy file="${resources}/javasrc/styles.css"
- todir="${build.javasrc}"
+ todir="${target.javasrc}"
filtering="off" />
</target>
<target name="jsdoc" depends="compile">
- <mkdir dir="${build.jsdoc}" />
+ <mkdir dir="${target.jsdoc}" />
<taskdef name="jsdoc" classname="org.apache.alexandria.jsdoc.JSDocTask" classpath="./build/classes/"/>
- <jsdoc jSDir="${js.src}" destDir="${build.jsdoc}" />
+ <jsdoc jSDir="${js.src}" destDir="${target.jsdoc}" />
</target>
<target name="uml" depends="xml, xml2dot, dot">
@@ -150,17 +162,17 @@
</target>
<target name="javadoc" depends="init">
- <mkdir dir="${build.javadoc}" />
+ <mkdir dir="${target.javadoc}" />
<javadoc
sourcepath="${java.src}"
- destDir="${build.javadoc}"
+ destDir="${target.javadoc}"
packagenames="*"
stylesheetfile="${resources}/javadoc/stylesheet.css">
</javadoc>
</target>
<target name="xml" depends="init, compile">
- <mkdir dir="${build.xml}" />
+ <mkdir dir="${target.xml}" />
<javadoc
sourcepath="${java.src}"
packagenames="*">
@@ -171,19 +183,19 @@
<param name="-bar" value="barvalue"/> -->
</doclet>
</javadoc>
- <move file="simple.xml" tofile="${build.xml}/xmldocs.xml"/>
+ <move file="simple.xml" tofile="${target.xml}/xmldocs.xml"/>
</target>
<target name="xml2dot" depends="init">
- <copy file="${resources}/javadoc/javadoc-v04draft.dtd" todir="${build.xml}" filtering="off" />
- <xslt force="true" in="${build.xml}/xmldocs.xml" out="${build.dot}/graph.dot" style="src/resources/javadoc/xml2dot.xsl"/>
+ <copy file="${resources}/javadoc/javadoc-v04draft.dtd" todir="${target.xml}" filtering="off" />
+ <xslt force="true" in="${target.xml}/xmldocs.xml" out="${target.dot}/graph.dot" style="src/resources/javadoc/xml2dot.xsl"/>
</target>
<target name="dot">
- <mkdir dir="${build.uml}" />
+ <mkdir dir="${target.uml}" />
<property name="dot.format" value="png"/>
- <property name="dot.source" value="${build.dot}/graph.dot"/>
- <property name="dot.dest" value="${build.uml}/graph"/>
+ <property name="dot.source" value="${target.dot}/graph.dot"/>
+ <property name="dot.dest" value="${target.uml}/graph"/>
<exec executable="dot">
<arg line="-T${dot.format} ${dot.source} -o ${dot.dest}.${dot.format}" />
@@ -194,10 +206,10 @@
<target name="vizant" depends="init, runvizant, xml2formats"/>
<target name="runvizant" depends="init, compile">
- <mkdir dir="${build.vizant}" />
- <taskdef name="vizant" classname="org.apache.alexandria.vizant.Vizant" classpath="${build}/classes/" />
+ <mkdir dir="${target.vizant}" />
+ <taskdef name="vizant" classname="org.apache.alexandria.vizant.Vizant" classpath="${build.classes}" />
<vizant antfile="${ant.src}"
- outfile="${build.vizant}/buildgraph.xml"
+ outfile="${target.vizant}/buildgraph.xml"
uniqueref="true">
<!--
<attrstmt type="graph">
@@ -236,28 +248,28 @@
</target>
<target name="xml2formats">
- <xslt in="${build.vizant}/buildgraph.xml" out="${build.vizant}/build.dot" style="src/resources/vizant/xml2dot.xsl" />
+ <xslt in="${target.vizant}/buildgraph.xml" out="${target.vizant}/target.dot" style="src/resources/vizant/xml2dot.xsl" />
<antcall target="dot">
- <param name="dot.source" value="${build.vizant}/build.dot"/>
- <param name="dot.dest" value="${build.vizant}/vizant"/>
+ <param name="dot.source" value="${target.vizant}/target.dot"/>
+ <param name="dot.dest" value="${target.vizant}/vizant"/>
</antcall>
<antcall target="dot">
<param name="dot.format" value="svg"/>
- <param name="dot.source" value="${build.vizant}/build.dot"/>
- <param name="dot.dest" value="${build.vizant}/vizant"/>
+ <param name="dot.source" value="${target.vizant}/target.dot"/>
+ <param name="dot.dest" value="${target.vizant}/vizant"/>
</antcall>
- <xslt in="${build.vizant}/buildgraph.xml" out="${build.vizant}/build.html" style="src/resources/vizant/xml2html.xsl" />
+ <xslt in="${target.vizant}/buildgraph.xml" out="${target.vizant}/target.html" style="src/resources/vizant/xml2html.xsl" />
- <xslt in="${build.vizant}/buildgraph.xml" out="${build.vizant}/buildtg.xml" style="src/resources/vizant/xml2tg.xsl" />
- <copy file="${build.vizant}/buildtg.xml" tofile="${build.vizant}/InitialXML._xml"/>
- <copy todir="${build.vizant}">
+ <xslt in="${target.vizant}/buildgraph.xml" out="${target.vizant}/buildtg.xml" style="src/resources/vizant/xml2tg.xsl" />
+ <copy file="${target.vizant}/buildtg.xml" tofile="${target.vizant}/InitialXML._xml"/>
+ <copy todir="${target.vizant}">
<fileset dir="src/resources/touchgraph" casesensitive="yes"/>
</copy>
- <copy todir="${build.vizant}">
+ <copy todir="${target.vizant}">
<fileset dir="src/resources/vizant" casesensitive="yes"/>
</copy>
</target>
@@ -265,10 +277,10 @@
<target name="tg">
<java classname="com.touchgraph.linkbrowser.TGLinkBrowser" fork="yes">
- <arg value="${build.vizant}/buildtg.xml"/>
+ <arg value="${target.vizant}/buildtg.xml"/>
<classpath>
<path>
- <fileset dir="${build.vizant}" casesensitive="yes">
+ <fileset dir="${target.vizant}" casesensitive="yes">
<patternset>
<include name="**/*.jar"/>
<include name="**/*.zip"/>