本文整理了Java中org.apache.tools.ant.taskdefs.Expand.setTaskType()
方法的一些代码示例,展示了Expand.setTaskType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Expand.setTaskType()
方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Expand
类名称:Expand
方法名:setTaskType
暂无
代码示例来源:origin: jenkinsci/jenkins
private static void unzipExceptClasses(File archive, File destDir, Project prj) {
Expand e = new Expand();
e.setProject(prj);
e.setTaskType("unzip");
e.setSrc(archive);
e.setDest(destDir);
PatternSet p = new PatternSet();
p.setExcludes("WEB-INF/classes/");
e.addPatternset(p);
e.execute();
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Explodes the plugin into a directory, if necessary.
*/
private static void explode(File archive, File destDir) throws IOException {
if(!destDir.exists())
destDir.mkdirs();
// timestamp check
File explodeTime = new File(destDir,".timestamp");
if(explodeTime.exists() && explodeTime.lastModified()==archive.lastModified())
return; // no need to expand
// delete the contents so that old files won't interfere with new files
Util.deleteContentsRecursive(destDir);
try {
Expand e = new Expand();
e.setProject(new Project());
e.setTaskType("unzip");
e.setSrc(archive);
e.setDest(destDir);
e.execute();
} catch (BuildException x) {
throw new IOException2("Failed to expand " + archive,x);
}
try {
new FilePath(explodeTime).touch(archive.lastModified());
} catch (InterruptedException e) {
throw new AssertionError(e); // impossible
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Explodes the plugin into a directory, if necessary.
*/
private static void explode(File archive, File destDir) throws IOException {
if(!destDir.exists())
destDir.mkdirs();
// timestamp check
File explodeTime = new File(destDir,".timestamp");
if(explodeTime.exists() && explodeTime.lastModified()==archive.lastModified())
return; // no need to expand
// delete the contents so that old files won't interfere with new files
Util.deleteContentsRecursive(destDir);
try {
Expand e = new Expand();
e.setProject(new Project());
e.setTaskType("unzip");
e.setSrc(archive);
e.setDest(destDir);
e.execute();
} catch (BuildException x) {
throw new IOException2("Failed to expand " + archive,x);
}
try {
new FilePath(explodeTime).touch(archive.lastModified());
} catch (InterruptedException e) {
throw new AssertionError(e); // impossible
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Explodes the plugin into a directory, if necessary.
*/
private static void explode(File archive, File destDir) throws IOException {
if(!destDir.exists())
destDir.mkdirs();
// timestamp check
File explodeTime = new File(destDir,".timestamp");
if(explodeTime.exists() && explodeTime.lastModified()==archive.lastModified())
return; // no need to expand
// delete the contents so that old files won't interfere with new files
Util.deleteContentsRecursive(destDir);
try {
Expand e = new Expand();
e.setProject(new Project());
e.setTaskType("unzip");
e.setSrc(archive);
e.setDest(destDir);
e.execute();
} catch (BuildException x) {
throw new IOException2("Failed to expand " + archive,x);
}
try {
new FilePath(explodeTime).touch(archive.lastModified());
} catch (InterruptedException e) {
throw new AssertionError(e); // impossible
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Explodes the plugin into a directory, if necessary.
*/
private static void explode(File archive, File destDir) throws IOException {
if (!destDir.exists()) {
destDir.mkdirs();
}
// timestamp check
File explodeTime = new File(destDir, ".timestamp");
if (explodeTime.exists() && explodeTime.lastModified() == archive.lastModified()) {
return; // no need to expand
}
// delete the contents so that old files won't interfere with new files
Util.deleteContentsRecursive(destDir);
try {
Expand e = new Expand();
e.setProject(new Project());
e.setTaskType("unzip");
e.setSrc(archive);
e.setDest(destDir);
e.execute();
} catch (BuildException x) {
throw new IOException2("Failed to expand " + archive, x);
}
try {
new FilePath(explodeTime).touch(archive.lastModified());
} catch (InterruptedException e) {
throw new AssertionError(e); // impossible
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
private static void unzipExceptClasses(File archive, File destDir, Project prj) {
Expand e = new Expand();
e.setProject(prj);
e.setTaskType("unzip");
e.setSrc(archive);
e.setDest(destDir);
PatternSet p = new PatternSet();
p.setExcludes("WEB-INF/classes/");
e.addPatternset(p);
e.execute();
}
代码示例来源:origin: org.hudsonci.plugins/cvs
e.setDest(destdir);
e.setSrc(CVSSCM.getArchiveFile(build));
e.setTaskType("unzip");
e.execute();
代码示例来源:origin: org.jvnet.hudson.plugins/cvs
e.setDest(destdir);
e.setSrc(CVSSCM.getArchiveFile(build));
e.setTaskType("unzip");
e.execute();
内容来源于网络,如有侵权,请联系作者删除!