The -p or -projecthelp option does exactly this, so you can just try:
ant -p build.xml
From ant’s command line documentation:
The
-projecthelpoption prints out a list of the build file’s targets. Targets that include adescriptionattribute are listed as “Main targets”, those without adescriptionare listed as “Other targets”, then the “Default” target is listed (“Other targets” are only displayed if there are no main targets, or if Ant is invoked in-verboseor-debugmode).