targetDir = new File(getTempDirectory(), "nx-index-" + Long.toHexString(System.nanoTime()));
DirSupport.mkdir(targetDir.toPath());
IndexPackingRequest packReq = new IndexPackingRequest(context, targetDir);
packReq.setCreateIncrementalChunks(true);
// not publishing legacy format anymore
packReq.setFormats(Arrays.asList(IndexFormat.FORMAT_V1));
indexPacker.packIndex(packReq);
File[] files = targetDir.listFiles();
if (files != null) {