org.apache.tools.ant
Class Diagnostics

java.lang.Object
  |
  +--org.apache.tools.ant.Diagnostics

public final class Diagnostics
extends java.lang.Object

A little diagnostic helper that output some information that may help in support. It should quickly give correct information about the jar existing in ant.home/lib and the jar versions...

Since:
Ant 1.5

Method Summary
static void doReport(java.io.PrintStream out)
          Print a report to the given stream.
static boolean isOptionalAvailable()
          Check if optional tasks are available.
static java.io.File[] listLibraries()
          return the list of jar files existing in ANT_HOME/lib and that must have been picked up by Ant script.
static void main(java.lang.String[] args)
          main entry point for command line
static void validateVersion()
          Check if core and optional implementation version do match.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isOptionalAvailable

public static boolean isOptionalAvailable()
Check if optional tasks are available. Not that it does not check for implementation version. Use validateVersion() for this.

Returns:
true if optional tasks are available.

validateVersion

public static void validateVersion()
                            throws BuildException
Check if core and optional implementation version do match.

Throws:
BuildException - if the implementation version of optional tasks does not match the core implementation version.

listLibraries

public static java.io.File[] listLibraries()
return the list of jar files existing in ANT_HOME/lib and that must have been picked up by Ant script.

Returns:
the list of jar files existing in ant.home/lib or null if an error occurs.

main

public static void main(java.lang.String[] args)
main entry point for command line

Parameters:
args - command line arguments.

doReport

public static void doReport(java.io.PrintStream out)
Print a report to the given stream.

Parameters:
out - the stream to print the report to.


Copyright 2000-2005 Apache Software Foundation. All Rights Reserved.