List of usage examples for org.eclipse.jgit.archive ArchiveFormats unregisterAll
public static void unregisterAll()
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(); } } }