Search in sources :

Example 1 with XZCompressor

use of org.eclipse.equinox.p2.internal.repository.tools.XZCompressor in project tycho by eclipse.

the class MirrorApplicationServiceImpl method xzCompress.

private void xzCompress(DestinationRepositoryDescriptor destination) throws FacadeException {
    if (!destination.isXZCompress()) {
        return;
    }
    try {
        XZCompressor xzCompressor = new XZCompressor();
        xzCompressor.setPreserveOriginalFile(destination.shouldKeepNonXzIndexFiles());
        xzCompressor.setRepoFolder(destination.getLocation().getAbsolutePath());
        xzCompressor.compressRepo();
    } catch (IOException e) {
        throw new FacadeException("XZ compression failed", e);
    }
}
Also used : FacadeException(org.eclipse.tycho.p2.tools.FacadeException) XZCompressor(org.eclipse.equinox.p2.internal.repository.tools.XZCompressor) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 XZCompressor (org.eclipse.equinox.p2.internal.repository.tools.XZCompressor)1 FacadeException (org.eclipse.tycho.p2.tools.FacadeException)1