Example usage for org.eclipse.jgit.archive ArchiveFormats unregisterAll

List of usage examples for org.eclipse.jgit.archive ArchiveFormats unregisterAll

Introduction

In this page you can find the example usage for org.eclipse.jgit.archive ArchiveFormats unregisterAll.

Prototype

public static void unregisterAll() 

Source Link

Document

Clean up by deregistering all formats that were registered by registerAll().

Usage

From source file:com.buildautomation.jgit.api.CreateArchive.java

License:Apache License

public static void createArchive() throws IOException, GitAPIException {
    try (Repository repository = CookbookHelper.openJGitCookbookRepository()) {
        // make the included archive formats known
        ArchiveFormats.registerAll();/*from  www  .j ava  2  s .c o m*/
        try {
            write(repository, ".zip", "zip");
            write(repository, ".tar.gz", "tgz");
            write(repository, ".tar.bz2", "tbz2");
            write(repository, ".tar.xz", "txz");
        } finally {
            ArchiveFormats.unregisterAll();
        }
    }
}

From source file:edu.nju.cs.inform.jgit.porcelain.CreateArchive.java

License:Apache License

public static void main(String[] args) throws IOException, GitAPIException {
    try (Repository repository = CookbookHelper.openJGitCookbookRepository()) {
        // make the included archive formats known
        ArchiveFormats.registerAll();//from w w  w  . j  a  v  a 2s.  com
        try {
            write(repository, ".zip", "zip");
            write(repository, ".tar.gz", "tgz");
            write(repository, ".tar.bz2", "tbz2");
            write(repository, ".tar.xz", "txz");
        } finally {
            ArchiveFormats.unregisterAll();
        }
    }
}