Serve a PairTree (https://wiki.ucop.edu/display/Curation/PairTree) and get volumes as zip files, mets.xml and metadata jsons.
To generate an executable package:
$ ./gradlew distZip
then find the result in build/distributions/pairtree-zip.zip
pairtree-zip/bin/pairtree-zip -pr <pairtree_root_path> -vl <volume_list_path> -dp <destination_path>
pairtree-zip/bin/pairtree-zip -pr <pairtree_root_path> -vl <volume_list_path> -dp <destination_path> -ci
pairtree-zip/bin/pairtree-zip -pr <pairtree_root_path> -vl <volume_list_path> -dp <destination_path> -ci -mj
pairtree-zip/bin/pairtree-zip -pr <pairtree_root_path> -vl <volume_list_path> -dp <destination_path> -ci -mj -wr