'(-h -help)'{-h,-help}'[display the help screen]' \
'(-v -version)'{-v,-version}'[print version information and exit]' \
'(-l -list)'{-l,-list}'[list all available targets in buildfile (excluding targets that have their hidden attribute set to true)]' \
'(-q -quiet)'{-q,-quiet}'[quiet operation, no output at all]' \
'-verbose[verbose, give some more output]' \
'-debug[output debug information]' \
'-logfile [use given file for log]:file:_files' \
'-D[set the property to the specified value to be used in the buildfile]' \
'-find []:file:_files' \
'-buildfile [specify an alternate buildfile name. Default is build.xml]:file:_files' \
'-logger [specify an alternate logger. Default is phing.listener.DefaultLogger. Other options include phing.listener.NoBannerLogger, phing.listener.AnsiColorLogger, phing.listener.XmlLogger, phing.listener.TargetLogger and phing.listener.HtmlColorLogger]' \
'-propertyfile [load properties from the specified file]:file:_files' \
'(-v --version)'{-v,--version}'[show version]' \
'1: :->targets' \
'*:: :->args' \
&& ret=0
case $state in
targets)
local buildfile; buildfile=build.xml
if [[ ! -f $buildfile ]]
then
ret=0
else
local targets; targets=($(sed -nE "/<target /s/.*name=[\"'](\w+)[\"'].*/\1/p" $buildfile))
_describe -t 'targets' 'target' targets && ret=0
fi
;;
args)
if [[ CURRENT -eq NORMARG && ${+opt_args[--match]} -eq 0 ]]
then
# If the current argument is the first non-option argument
# and --match isn't present then a pattern is expected