net.sf.fikin.ant
Class VelocityDocletTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by net.sf.fikin.ant.DocletTask
              extended by net.sf.fikin.ant.VelocityDocletTask
Direct Known Subclasses:
AntTasksDocHtmlDocletTask

public class VelocityDocletTask
extends DocletTask

Dedicated Ant task for executing a Velocity Template via VelocityDoclet doclet

Example: Execute a template against some java sources

      <velocityDoclet template="my-template.vm" file="my-output.txt" >
          <packageset dir="src" defaultexcludes="yes">
              <include name="net/sf/fikin/ant/**" />
          </packageset>
      </velocityDoclet>
 

Example: Pass current timestamp as extra Java System parameters read by the template

      <velocityDoclet template="my-template.vm" file="my-output.txt" >
          <packageset dir="src" defaultexcludes="yes">
              <include name="net/sf/fikin/ant/**" />
          </packageset>
          <param name="-J-DDSTAMP=${DSTAMP}" />
      </velocityDoclet>
 
created on Sep 24, 2006

Since:
Version:
$Revision: 1.3 $
Author:
fiykov
Ant Task Name:
velocityDoclet

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
VelocityDocletTask()
           
 
Method Summary
protected  void check()
          check parameters
 void init()
          set the doclet class name
 void setFile(java.io.File outFile)
          set output file to be generated
 void setName(java.lang.String fqClassName)
          Deprecated. One can't replace the built-in Velocity Doclet
 void setTemplate(java.lang.String templateName)
          set template name, it resolves either to a file or a classloader resource
 void setVelocityLog(boolean flg)
          if true indicate that a velocity.log is to be generated
 
Methods inherited from class net.sf.fikin.ant.DocletTask
addFileset, addPackage, addPackageset, addParam, createBootclasspath, createClasspath, createParam, createSourcepath, execute, init_javadoc, setBootclasspath, setBootClasspathRef, setClasspath, setClasspathRef, setExcludePackageNames, setExecutable, setFailonerror, setLinksource, setPackageList, setPackagenames, setSource, setSourcepath, setSourcepathRef, setVerbose
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityDocletTask

public VelocityDocletTask()
Method Detail

setName

public void setName(java.lang.String fqClassName)
Deprecated. One can't replace the built-in Velocity Doclet

Description copied from class: DocletTask
set doclet's fully-qualified class name

Overrides:
setName in class DocletTask
Parameters:
fqClassName - doclet's class name
Ant Task Param Required:
false

setTemplate

public void setTemplate(java.lang.String templateName)
set template name, it resolves either to a file or a classloader resource

Parameters:
templateName -
Ant Task Param Required:
true

setFile

public void setFile(java.io.File outFile)
set output file to be generated

Parameters:
outFile -
Ant Task Param Required:
true

setVelocityLog

public void setVelocityLog(boolean flg)
if true indicate that a velocity.log is to be generated

Parameters:
flg -
Ant Task Param Required:
false

check

protected void check()
              throws org.apache.tools.ant.BuildException
check parameters

Overrides:
check in class DocletTask
Throws:
org.apache.tools.ant.BuildException

init

public void init()
          throws org.apache.tools.ant.BuildException
set the doclet class name

Overrides:
init in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.