Search in sources :

Example 1 with Tar

use of org.apache.tools.ant.taskdefs.Tar in project adempiere by adempiere.

the class CreateZipFile method tarFolder.

public static void tarFolder(File srcFolder, File destTarFile, String includesdir) {
    Tar tarer = new Tar();
    tarer.setDestFile(destTarFile);
    tarer.setBasedir(srcFolder);
    tarer.setIncludes(includesdir);
    tarer.setCaseSensitive(false);
    tarer.setTaskName("tar");
    tarer.setTaskType("tar");
    tarer.setProject(new Project());
    tarer.setOwningTarget(new Target());
    tarer.execute();
}
Also used : Project(org.apache.tools.ant.Project) Target(org.apache.tools.ant.Target) Tar(org.apache.tools.ant.taskdefs.Tar)

Example 2 with Tar

use of org.apache.tools.ant.taskdefs.Tar in project JessMA by ldcsaa.

the class Tarrer method getTask.

/** 获取压缩任务对象 */
@Override
protected Task getTask() {
    Project project = new Project();
    Tar tar = new Tar();
    tar.setProject(project);
    createSourceFileSet(tar);
    tar.setDestFile(getTargetFile());
    tar.setCompression(getCompressionMethod());
    return tar;
}
Also used : Project(org.apache.tools.ant.Project) Tar(org.apache.tools.ant.taskdefs.Tar)

Aggregations

Project (org.apache.tools.ant.Project)2 Tar (org.apache.tools.ant.taskdefs.Tar)2 Target (org.apache.tools.ant.Target)1