org.jcoderz.phoenix.report
Class ReportNormalizerAntTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.MatchingTask
              extended by org.jcoderz.phoenix.report.ReportNormalizerAntTask
All Implemented Interfaces:
Cloneable, org.apache.tools.ant.types.selectors.SelectorContainer

public final class ReportNormalizerAntTask
extends org.apache.tools.ant.taskdefs.MatchingTask

Report Normalizer Ant Task. This Task takes none, one or more input reports such as Checkstyle or PMD and generates a normalized report file (XML) for any Java source under srcdir. This version of the class JcoderzReportAntTask just creates the combined XML report. No further processing into a HTML report is done at this time.

Author:
Michael Griffel (Michael.Griffel@jcoderz.org), Michael Rumpf (Michael.Rumpf@jcoderz.org)

Nested Class Summary
 class ReportNormalizerAntTask.Report
          This class represents an input report with a format and filename.
static class ReportNormalizerAntTask.SourceDirectory
           
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
ReportNormalizerAntTask()
           
 
Method Summary
 void addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
          Adds a system property.
 org.apache.tools.ant.types.Path createBootclasspath()
          Adds a bootclasspath to the task.
 org.apache.tools.ant.types.Path createClasspath()
          Adds a classpath to the task.
 org.apache.tools.ant.types.Commandline.Argument createJvmarg()
          Adds a JVM argument.
 ReportNormalizerAntTask.Report createReport()
          Adds a Report file such as PMD report or checkstyle report.
 ReportNormalizerAntTask.SourceDirectory createSrcDir()
          Adds a source folder file such as PMD report or checkstyle report.
 void execute()
          Execute this task.
 void setDebug(boolean b)
           
 void setDir(File dir)
          The directory to invoke the VM in.
 void setFailonerror(boolean b)
          Set whether we should fail on an error.
 void setFilter(File f)
          Sets the filter file to f.
 void setLevel(String level)
          Sets the level to given level.
 void setName(String projectName)
          Sets the projectName to given projectName.
 void setOut(File dir)
          Sets the output directory to given dir.
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportNormalizerAntTask

public ReportNormalizerAntTask()
Method Detail

setOut

public void setOut(File dir)
Sets the output directory to given dir. This directory is used to store the XML/HTML report file(s).

Parameters:
dir - The output directory to set.

setFilter

public void setFilter(File f)
Sets the filter file to f. This file is used to filter to raw jcoderz XML report.

Parameters:
f - The filter file.

setName

public void setName(String projectName)
Sets the projectName to given projectName.

Parameters:
projectName - The projectName to set.

setLevel

public void setLevel(String level)
Sets the level to given level.

Parameters:
level - The level to set.

setDir

public void setDir(File dir)
The directory to invoke the VM in. Ignored if no JVM is forked.

Parameters:
dir - the directory to invoke the JVM from.

setFailonerror

public void setFailonerror(boolean b)
Set whether we should fail on an error.

Parameters:
b - Whether we should fail on an error.

setDebug

public void setDebug(boolean b)

createClasspath

public org.apache.tools.ant.types.Path createClasspath()
Adds a classpath to the task.

Returns:
The newly created classpath.

createBootclasspath

public org.apache.tools.ant.types.Path createBootclasspath()
Adds a bootclasspath to the task.

Returns:
The newly created bootclasspath.

addSysproperty

public void addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
Adds a system property.

Parameters:
sysp - system property

createJvmarg

public org.apache.tools.ant.types.Commandline.Argument createJvmarg()
Adds a JVM argument.

Returns:
The newly created Command line argument.

createReport

public ReportNormalizerAntTask.Report createReport()
Adds a Report file such as PMD report or checkstyle report.

Returns:
The newly create report file.

createSrcDir

public ReportNormalizerAntTask.SourceDirectory createSrcDir()
Adds a source folder file such as PMD report or checkstyle report.

Returns:
The newly create report file.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute this task.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - An building exception occurred.


Copyright 2007 The jCoderZ Project.