Cloning the repo. I guess you have this already but to be complete
$ git clone https://github.com/sebastianbergmann/phpunit
Change into it
$ cd phpunit
A build.xml files means (mostly) that Ant is used as build management system. To figure out which targets the project (-p) provides just ask ant itself:
$ ant -p
Then you should get this output:
Buildfile: /private/tmp/phpunit/build.xml
Main targets:
clean Cleanup build artifacts
composer Install dependencies with Composer
pdepend Calculate software metrics using PHP_Depend
pear Create PEAR package of PHPUnit and all its dependencies (release)
phar Create PHAR archive of PHPUnit and all its dependencies (release)
phar-alpha Create PHAR archive of PHPUnit and all its dependencies (alpha)
phar-beta Create PHAR archive of PHPUnit and all its dependencies (beta)
phpab Generate autoloader script
phpcpd Find duplicate code using PHPCPD
phpcs Find coding standard violations using PHP_CodeSniffer
phpcs-ci Find coding standard violations using PHP_CodeSniffer
phpdox Generate software project documentation using phpDox
phploc Measure project size using PHPLOC
phpmd Perform project mess detection using PHPMD
phpmd-ci Perform project mess detection using PHPMD
phpunit Run unit tests with PHPUnit
prepare Prepare for build
Default target: build
The rest is simple - just type
$ ant phar
The task will install Composer (even if you already have it, but copies it into the current folder) and downloads all dependencies.