Index > groovydoc を生成する build.xml (ant)
Tue, April 20, 2010

groovydoc を生成する build.xml (ant)

.groovy のままでコーディング中に使える build.xml です。

build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project default="doc">

     <property environment="env" />

     <!--
     <property name="env.GROOVY_HOME" value="/home/foo/groovy"/>
     -->

     <path id="groovy.classpath"> <fileset dir="${env.GROOVY_HOME}/embeddable/" /> </path>
     <taskdef name="groovyc" classname    = "org.codehaus.groovy.ant.Groovyc" classpathref = "groovy.classpath" /> 

    <target name="init">
        <property name="build.src" value="./"/>
        <property name="build.docs" value="./docs"/>

        <path id="compile.class.path">
            <!--
            <fileset dir="${env.GROOVY_HOME}/lib/" />
            -->
            <fileset dir="${env.GROOVY_HOME}/embeddable/" />
        </path>

        <!--
        <echo>GROOVY_HOME:${env.GROOVY_HOME}</echo>
        -->

    </target>


    <target name="clean" depends="init">
        <delete dir="${build.docs}" />
    </target>


    <taskdef name="groovydoc"
             classname="org.codehaus.groovy.ant.Groovydoc"
                  classpathref="groovy.classpath"/>

    <target name="doc" depends="init" description = "build groovydoc">
        <groovydoc
            sourcepath = "${build.src}"
            destdir    = "${build.docs}" 
        />
    </target> 

</project>
 Twitter
follow me on Twitter
 Categories