ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kev Jackson <>
Subject RFE - provide 'scope' information for targets (includes possible implementation)
Date Thu, 27 Apr 2006 02:50:16 GMT

One of the managers here was looking at the way the description 
attribute is used within ant.  He thought that it is used for two purposes:

1 - describe a task so that -projecthelp can provide output for the user 
of a build file
2 - to provide some kind of 'scope' to the targets ie targets without a 
description are considered 'private' and really shouldn't be called directly

He asked if I could look into a way of enforcing the second of these in 
code, so that it is impossible to call a 'private' target directly from 
the cmd line.

It's a relatively straightfoward change involving only minor additions 
to the code, and it's bwc (as far as I can tell).

Attached patch file of implementation for your consideration.

- bwc (AFAIK) - by default targets are 'public', so old build files 
which don't have target scope continue to run as normal
- could be used by IDE developers to filter out executable targets more 
- could be used by other tools (AntGraph etc) to provide more semantic 
information to the user
- allows a description to be added to complex internal targets, whilst 
still keeping them 'private'

- change to the core classes

Current patch doesn't alter the -projecthelp to separate public/private 
targets, it simply enforces the new scope rules for execution.

- only tested manually, no unit tests


View raw message