本文整理了Java中org.apache.tools.ant.taskdefs.Expand.addPatternset()
方法的一些代码示例,展示了Expand.addPatternset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Expand.addPatternset()
方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Expand
类名称:Expand
方法名:addPatternset
[英]Add a patternset.
[中]添加一个图案集。
代码示例来源: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: HuaweiBigData/StreamCQL
private Expand createExpand(File jarFile)
{
String outputDir = expandDir + File.separator + jarFile.getName();
Project prj = new Project();
FileSet fileSet = createFileSetForJarFile(jarFile, prj);
PatternSet patternSet = createPatternSet(prj);
Expand expand = new Expand();
expand.setProject(prj);
expand.setOverwrite(true);
expand.setDest(new File(outputDir));
expand.addFileset(fileSet);
expand.addPatternset(patternSet);
return expand;
}
代码示例来源: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.netbeans.modules/org-netbeans-modules-j2me-common-ant
private void extractZip(final File source, final File target) throws BuildException
{
final Expand e = new Expand();
e.setProject(getProject());
e.setOverwrite(false);
if (excludeManifest)
{
final PatternSet ps = new PatternSet();
ps.setExcludes("META-INF,META-INF/MANIFEST.MF"); //NOI18N
e.addPatternset(ps);
}
e.setSrc(source);
e.setDest(target);
e.execute();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mobility-antext
private void extractZip(final File source, final File target) throws BuildException
{
final Expand e = new Expand();
e.setProject(getProject());
e.setOverwrite(false);
if (excludeManifest)
{
final PatternSet ps = new PatternSet();
ps.setExcludes("META-INF,META-INF/MANIFEST.MF"); //NOI18N
e.addPatternset(ps);
}
e.setSrc(source);
e.setDest(target);
e.execute();
}
代码示例来源:origin: ldcsaa/JessMA
/** 获取解压任务对象 */
@Override
protected Task getTask()
{
Project project = new Project();
Expand expand = getExpand();
PatternSet ps = getPatternSet();
expand.setProject(project);
expand.setSrc(getSourceFile());
expand.setDest(getTargetDir());
expand.setOverwrite(isOverwrite());
if(ps != null)
{
ps.setProject(project);
expand.addPatternset(ps);
}
return expand;
}
}
内容来源于网络,如有侵权,请联系作者删除!