ProjectHelp

Description

Collects information about the current project, and hands this information to the build logger.

This task's primary purpose is to be invoked by the Ant command-line launcher itself, whenever it is being run with the -projecthelp switch. It may, however, also be used from within a target — this is primarily useful for something like a "usage" target.

Targets are grouped in the following manner:

Within these groups, targets are listed in alphabetical order by target name.

Parameters

Attribute Description Required
includeMainTargets If true, the task's output will include the names and descriptions of "main" targets. "Main" targets are those for which the build file author has specified a target description. No, default is true.
includeDescription If true, the task's output will include the project description. No, default is true.
includeDefaultTarget If true, the task's output will include information about which target has been configured as the project default. No, default is true.
includeSubTargets If true, the task's output will include the names of "sub" targets. "Sub" targets are those for which the build file author has not specified a target description. No, default is false.
includeInternalTargets If true, the task's output will include "internal" targets. "Internal" targets are those whose names start with - (hyphen), which means they cannot be invoked from the Ant command line, only from other targets in the project. No, default is false.
lineWidth Determines the maximum line width available for output. The task will do its best so as not to exceed this line width, line wrapping task descriptions where possible and appropriate. However, since the task has no control over the actual build logger used while running, the real output may exceed this line width. No, default is unlimited.1

1Technically, the default line width is Integer.MAX_VALUE (231 - 1), which should be "unlimited" for most practical purposes.

Examples

<project name="myproject" default="usage">
  <target name="usage">
    <projecthelp/>
  </target>

  <!-- Imagine numerous other targets here... -->
</project>
      

Ensures that when the user just invokes Ant, without specifying a target, he or she is presented with a usage message equivalent to that created by invoking ant -projecthelp.

<projecthelp includeSubTargets="true"/>

Includes names of targets without a specified description.

Parameters specified as nested elements

This task does not support any nested elements.


Copyright © 2000-2003 Apache Software Foundation. All rights Reserved.