org.osjava.jardiff.ant
Class JarDiffTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.osjava.jardiff.ant.JarDiffTask

public class JarDiffTask
extends org.apache.tools.ant.Task

Process two jarfiles generating a public API difference report. This is useful for keeping track of API changes between versions of a project.

Author:
Antony Riley

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
JarDiffTask()
           
 
Method Summary
 void execute()
          Run the task, generating the jardiff report.
 void setForce(boolean force)
          Force output even if there is an existing diff file which is newer than the source jar files.
 void setFromjar(File fromJar)
          Set the from jar file.
 void setFromname(String fromName)
          Set the from jar visible name.
 void setOut(File out)
          Set the out file.
 void setTojar(File toJar)
          Set the to jar file.
 void setToname(String toName)
          Set the to jar visible name.
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, 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

JarDiffTask

public JarDiffTask()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Run the task, generating the jardiff report.

Throws:
org.apache.tools.ant.BuildException - When there is an error creating the diff, When there is a problem with the xml parser, When there is a problem with the xslt transformer When the attributes specified are invalid.

setFromjar

public void setFromjar(File fromJar)
Set the from jar file. Required attribute.

Parameters:
fromJar - a jar file.

setTojar

public void setTojar(File toJar)
Set the to jar file. Required attribute.

Parameters:
toJar - a jar file.

setOut

public void setOut(File out)
Set the out file. Required attribute.

Parameters:
out - an output file.

setFromname

public void setFromname(String fromName)
Set the from jar visible name. Optional attribute. Defaults to the filename of fromjar.

Parameters:
fromName - a visible name.

setToname

public void setToname(String toName)
Set the to jar visible name. Optional attribute. Defaults to the filename of tojar.

Parameters:
toName - a visible name.

setForce

public void setForce(boolean force)
Force output even if there is an existing diff file which is newer than the source jar files. Optional attribute. Defaults to false.

Parameters:
force - true to force output, false otherwise


Copyright © 2005-2006 OSJava. All Rights Reserved.