[opencms-dev] Create your OpenCMS Javadoc with this build.xml for Ant !

Balazs Wellisch balazs at neusolutions.com
Fri Feb 20 02:27:01 CET 2004


Alex,

I made a couple of modifications to your code to suit my system (Linux). I
thought I repost the results in case someone else wants to use your code on
Linux.

The code will be generated into the base directory/docs folder by default
but can be overwritten by changing the value of the javadoc.build.root
property on line 2.

Just paste this code inside the default build.xml file.

<target name="javadoc">
    <property name="javadoc.build.root" value="${opencms.output}" />
    <property name="jdk.root" value="${env.JAVA_HOME}" />
    <mkdir dir="${javadoc.build.root}${file.separator}docs" />
    <path id="src">
        <fileset dir="${opencms.input}${file.separator}src">
            <include name="com/**/*.java" />
            <include name="org/**/*.java" />
        </fileset>
    </path>
    <pathconvert pathsep=" " property="files" refid="src">
        <map from="${opencms.input}${file.separator}src${file.separator}"
to=""/>
    </pathconvert>
    <echo message="${files}"
file="${javadoc.build.root}${file.separator}srcs.txt"/>
    <exec dir="${opencms.input}/src"
executable="${jdk.root}${file.separator}bin${file.separator}javadoc">
        <arg value="-protected" />
        <arg value="-source" />
        <arg value="JDK_MAJOR_VERSION" />
        <arg value="-d" />
        <arg value="${javadoc.build.root}${file.separator}docs" />
        <arg value="-use" />
        <arg value="-author" />
        <arg value="@${javadoc.build.root}${file.separator}srcs.txt" />
    </exec>
</target>

I hope this is helpful.

Balazs

-----Original Message-----
From: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
On Behalf Of Alex !
Sent: Wednesday, February 18, 2004 12:14 PM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Create your OpenCMS Javadoc with this build.xml for
Ant !

Just change the paths etc to suit your system:

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="javadoc">
    <target name="javadoc">
        <property name="javadoc.build.root" value="C:\dev\builddir\javadoc" 
/>
        <property name="jdk.root" value="C:\dev\java\j2sdk1.4.1_01" />
        <mkdir dir="${javadoc.build.root}/docs" />
        <path id="src">
            <fileset dir="${javadoc.build.root}/src">
                <include name="com/**/*.java" />
                <include name="org/**/*.java" />
            </fileset>
        </path>
        <pathconvert pathsep=" " property="files" refid="src">
            <map 
from="${javadoc.build.root}${file.separator}src${file.separator}" to=""/>
        </pathconvert>
        <echo message="${files}" file="${javadoc.build.root}/srcs.txt"/>
        <exec dir="${javadoc.build.root}/src" 
executable="${jdk.root}/bin/javadoc.exe">
            <arg value="-protected" />
            <arg value="-source" />
            <arg value="JDK_MAJOR_VERSION" />
            <arg value="-d" />
            <arg value="${javadoc.build.root}${file.separator}docs" />
            <arg value="-use" />
            <arg value="-author" />
            <arg value="@${javadoc.build.root}${file.separator}srcs.txt" />
        </exec>
    </target>
</project>


Hope this is of some use.


Alex !

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list