private void archive(File jar, List<Iterable<Entry>> sources) throws IOException { Archiver archiver = Archiver.builder() // .useRoot(false) // .normalize(true) // .build(); archiver.archive(jar, new AggregateSource(sources)); if (logger.isDebugEnabled()) { int size = 0; for (Iterable<?> source : sources) { size += size(source); } logger.debug("Created archive {} with {} entries", jar, size); } }
public ArchiverBuilder executable(String... executables) { return executable(ImmutableList.copyOf(executables)); }
public ArchiverBuilder excludes(String... excludes) { return excludes(ImmutableList.copyOf(excludes)); }
public void execute(ProvisioningContext context) { ArchiverBuilder builder = Archiver.builder(); if (executable != null) { builder.executable(StringUtils.split(executable, ",")); .useRoot(useRoot) .withPrefix(prefix) .posixLongFileMode(true) .build(); try { File archiveFile;
public ArchiverBuilder includes(String... includes) { return includes(ImmutableList.copyOf(includes)); }
public static ArchiverBuilder builder() { return new ArchiverBuilder(); }
private void archive(File jar, List<Iterable<Entry>> sources) throws IOException { Archiver archiver = Archiver.builder() // .useRoot(false) // .normalize(true) // .build(); archiver.archive(jar, new AggregateSource(sources)); if (logger.isDebugEnabled()) { int size = 0; for (Iterable<?> source : sources) { size += size(source); } logger.debug("Created archive {} with {} entries", jar, size); } }