|
Hello Alsak,
I'm trying to use the latest CVS code, and i run in
the following issues:
- XJavadoc doesn't work with JDK 1.4, i submitted a
bug report with the stack trace,
- the build files are a bit broken, you need to do
the following to fix them:
* add xdoclet/xdoclet/lib/JavaCC.zip
* add set _CP_=%_CP_%;..\lib\JavaCC.zip to
xdoclet/xdoclet/script/build.bat (idem build.sh)
* use the attached build.xml in
xdoclet/xdoclet/core/script (sorry, i cannot run a diff because i don't have
proper CVS access, my firewall prevents it. Use windiff to find the
differences)
Tussen takk,
Ludovic Claude
|
<?xml version="1.0"?> <project name="XDoclet" default="main" basedir="..">
<!-- =================================================================== -->
<!-- Define class path -->
<!-- =================================================================== -->
<path id="project.class.path">
<fileset dir="${basedir}/../lib">
<include name="**/*.jar" />
</fileset>
<!-- append the external classpath lastly -->
<pathelement path="${java.class.path}" />
</path>
<!-- =================================================================== -->
<!-- Init properties -->
<!-- =================================================================== -->
<target name="init">
<property name="Name" value="XDoclet"/>
<property name="name" value="xdoclet"/>
<property name="build.dir" value="build" />
<property name="dist.dir" value="dist" />
<property name="docs.dir" value="docs" />
<property name="resources.dir" value="resources"/>
<property name="src.dir" value="src" />
<property name="config.dir" value="config" />
<property name="samples.dir" value="samples" />
<property name="packages" value="${name}.*"/>
<property name="build.compiler" value="modern" />
<property name="classpath" value="" />
<available file="../../xjavadoc/build.xml" property="xjavadoc.source.present"/>
</target>
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
<target name="prepare" depends="init,build-xjavadoc">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/classes"/>
<mkdir dir="${build.dir}/docs"/>
<mkdir dir="${build.dir}/docs/api"/>
<mkdir dir="${dist.dir}" />
<mkdir dir="${dist.dir}/docs"/>
<mkdir dir="${dist.dir}/docs/api"/>
<mkdir dir="${dist.dir}/samples"/>
<mkdir dir="${dist.dir}/lib"/>
</target>
<target name="build-xjavadoc" if="xjavadoc.source.present">
<!-- build xjavadoc -->
<echo message="XJavadoc sources are available. Building xjavadoc..."/>
<ant dir="../../xjavadoc" target="jar" inheritAll="false">
<property name="jar.file" value="${basedir}/../lib/xjavadoc.jar"/>
</ant>
<copy file="${basedir}/../lib/xjavadoc.jar" todir="${dist.dir}/lib" />
</target>
<!-- =================================================================== -->
<!-- Beautify the code -->
<!-- =================================================================== -->
<target name="beautify" depends="prepare">
<taskdef name="pretty" classname="org.acm.seguin.ant.Pretty"
classpath="${basedir}/../lib/prettyprinter.jar"/>
<!--pretty settingsDir="${basedir}/../config" cvs="true" compileDir="${build.dir}/classes">
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
</pretty-->
</target>
<!-- =================================================================== -->
<!-- Compiles the source code -->
<!-- =================================================================== -->
<target name="compile" depends="beautify">
<javac srcdir="${src.dir}"
destdir="${build.dir}/classes"
classpathref="project.class.path"
debug="on"
deprecation="off"
optimize="off"
includes="**/*.java"
/>
</target>
<!-- =================================================================== -->
<!-- Creates the jar archives -->
<!-- =================================================================== -->
<target name="jar" depends="compile">
<copy todir="${build.dir}/classes">
<fileset dir="${resources.dir}"/>
</copy>
<copy todir="${build.dir}/classes">
<fileset dir="${config.dir}" />
</copy>
<jar jarfile="${dist.dir}/lib/${name}.jar"
basedir="${build.dir}/classes"
/>
<!-- Copy required jar files to samples/lib -->
<mkdir dir="${samples.dir}/lib"/>
<copy todir="${samples.dir}/lib">
<fileset dir="${basedir}/../lib"/>
</copy>
<!-- Copy xdoclet.jar to samples/lib -->
<copy file="${dist.dir}/lib/${name}.jar" todir="${samples.dir}/lib" />
</target>
<!-- =================================================================== -->
<!-- Creates the binary structure -->
<!-- =================================================================== -->
<target name="main" depends="jar">
</target>
<!-- =================================================================== -->
<!-- Cleans up generated stuff -->
<!-- =================================================================== -->
<target name="clean" depends="init">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<ant antfile="script/build.xml"
dir="${samples.dir}"
target="clean"/>
</target>
<!-- =================================================================== -->
<!-- Generate template tags documentation from source -->
<!-- =================================================================== -->
<target name="document" depends="jar">
<taskdef name="document"
classname="xdoclet.doc.DocumentDocletTask"
classpath="${basedir}/../core/dist/lib/${name}.jar;${basedir}/../lib/xjavadoc.jar;../lib/ant.jar;../lib/log4j.jar"
/>
<document sourcepath="${src.dir}"
destdir="${build.dir}/docs/templates"
classpath="../core/dist/lib/${name}.jar;${basedir}/../lib/xjavadoc.jar;./lib/ant.jar;../lib/log4j.jar;${java.class.path}">
<fileset dir="${src.dir}">
<include name="**/*TagsHandler.java" />
</fileset>
<documenttags/>
</document>
<copy todir="${build.dir}/docs">
<fileset dir="${docs.dir}" />
</copy>
</target>
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadocs" depends="prepare">
<javadoc packagenames="${packages}"
sourcepath="${src.dir}"
destdir="${build.dir}/docs/api"
author="true"
version="true"
windowtitle="${Name} API"
doctitle="${Name}">
<classpath refid="project.class.path"/>
</javadoc>
</target>
<!-- ========================================= -->
<!-- generate todo-list from on @todo tags -->
<!-- ========================================= -->
<target name="todo" depends="jar">
<taskdef
name="todo"
classname="xdoclet.doc.DocumentDocletTask"
classpath="../core/dist/lib/${name}.jar;${basedir}/../lib/xjavadoc.jar;./lib/ant.jar;../lib/xjavadoc.jar;../lib/log4j.jar"
/>
<path id="todo.classpath">
<pathelement path="../core/dist/lib/${name}.jar" />
<pathelement path="${basedir}/../lib/xjavadoc.jar" />
<pathelement path="../core/resources/xdoclet/doc/info/" />
<pathelement path="../lib/ant.jar" />
<pathelement path="../lib/log4j.jar" />
<pathelement path="${java.class.path}" />
</path>
<todo
sourcepath="${src.dir}"
destdir="${build.dir}/todo"
classpathref="todo.classpath"
>
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
<info/>
</todo>
</target>
<!-- =================================================================== -->
<!-- Creates the distribution -->
<!-- =================================================================== -->
<target name="dist" depends="main,jar,document,javadocs,todo">
<copy todir="${dist.dir}/docs">
<fileset dir="${basedir}/docs"/>
<fileset dir="${build.dir}/docs"/>
</copy>
<copy todir="${dist.dir}/src">
<fileset dir="${src.dir}"/>
<fileset dir="${resources.dir}/"/>
</copy>
</target>
</project>
