Zip Library

This module (incode-module-zip-dom) allows a zip to be created from a collection of files.

API & Implementation

The ZipService defines the following API:

public class ZipService {

    @lombok.Data                                                        (1)
    public static class FileAndName {
        private final String name;
        private final File file;

    public byte[] zip(final List<FileAndName> fileAndNameList) { ... }  (2)
    public byte[] zipFiles(final List<File> fileList) { ... }           (3)
1 immutable value type
2 Returns a byte array which is a zip of the collection of files. Rather than use the name of the file (which might be temporary files, for example), the name of each file to use (in its zip "entry") is provided.
3 Similar to zip(…​), but uses each file’s name as the zip entry (rather than providing it explicitly).

These actions are all programmatic and do not appear in the UI.

How to configure/use


Update your classpath by adding this dependency in your dom project’s pom.xml:


Check for later releases by searching Maven Central Repo.

For instructions on how to use the latest -SNAPSHOT, see the contributors guide.


In the AppManifest, update its getDependencies() method, eg:

public Set<Module> getDependencies() {
    return Sets.newHashSet(

Known issues

None known at this time.


Maven can report modules dependencies using:

mvn dependency:list -o -pl modules/lib/zip/impl -D excludeTransitive=true

This shows no additional compile/runtime dependencies (other than Apache Isis itself).