use of org.apache.tools.ant.taskdefs.Zip in project intellij-community by JetBrains.
the class ZipContainer method createTask.
protected Zip createTask() {
Zip task = new Zip();
task.setTaskName("zip");
return task;
}
use of org.apache.tools.ant.taskdefs.Zip in project JessMA by ldcsaa.
the class Zipper method getTask.
/** 获取压缩任务对象 */
@Override
protected Task getTask() {
Project project = new Project();
Zip zip = new Zip();
FileSet src = getSourceFileSet();
src.setProject(project);
zip.setProject(project);
zip.setDestFile(getTargetFile());
zip.addFileset(src);
if (encoding != null)
zip.setEncoding(encoding);
if (comment != null)
zip.setComment(comment);
return zip;
}
use of org.apache.tools.ant.taskdefs.Zip in project gradle by gradle.
the class TestFile method createZip.
public TestFile createZip(Object path) {
Zip zip = new Zip();
zip.setWhenempty((Zip.WhenEmpty) Zip.WhenEmpty.getInstance(Zip.WhenEmpty.class, "create"));
TestFile zipFile = file(path);
zip.setDestFile(zipFile);
zip.setBasedir(this);
zip.setExcludes("**");
zip.setProject(new Project());
zip.execute();
return zipFile;
}
use of org.apache.tools.ant.taskdefs.Zip in project adempiere by adempiere.
the class CreateZipFile method zipFolder.
/**
* Zip the srcFolder into the destFileZipFile. All the folder subtree of the src folder is added to the destZipFile
* archive.
*
*
* @param srcFolder File, the path of the srcFolder
* @param destZipFile File, the path of the destination zipFile. This file will be created or erased.
*/
public static void zipFolder(File srcFolder, File destZipFile, String includesdir) {
Zip zipper = new Zip();
zipper.setDestFile(destZipFile);
zipper.setBasedir(srcFolder);
zipper.setIncludes(includesdir);
zipper.setUpdate(true);
zipper.setCompress(true);
zipper.setCaseSensitive(false);
zipper.setFilesonly(false);
zipper.setTaskName("zip");
zipper.setTaskType("zip");
zipper.setProject(new Project());
zipper.setOwningTarget(new Target());
zipper.execute();
System.out.println(destZipFile);
}