- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.tools.ant.types.ZipFileSet
类的一些代码示例,展示了ZipFileSet
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFileSet
类的具体详情如下:
包路径:org.apache.tools.ant.types.ZipFileSet
类名称:ZipFileSet
[英]A ZipFileSet is a FileSet with extra attributes useful in the context of Zip/Jar tasks. A ZipFileSet extends FileSets with the ability to extract a subset of the entries of a Zip file for inclusion in another Zip file. It also includes a prefix attribute which is prepended to each entry in the output Zip file. Since ant 1.6 ZipFileSet can be defined with an id and referenced in packaging tasks
[中]ZipFileSet是一个具有额外属性的文件集,在Zip/Jar任务的上下文中非常有用。ZipFileSet扩展了文件集,能够提取Zip文件的一个子集条目以包含在另一个Zip文件中。它还包括一个前缀属性,该属性在输出Zip文件中的每个条目前面。因为ant 1.6 ZipFileSet可以用id定义,并在打包任务中引用
代码示例来源:origin: org.apache.ant/ant
/**
* File to incorporate as application.xml.
* @param descr the descriptor file
*/
public void setAppxml(File descr) {
deploymentDescriptor = descr;
if (!deploymentDescriptor.exists()) {
throw new BuildException(
"Deployment descriptor: %s does not exist.",
deploymentDescriptor);
}
// Create a ZipFileSet for this file, and pass it up.
ZipFileSet fs = new ZipFileSet();
fs.setFile(deploymentDescriptor);
fs.setFullpath(XML_DESCRIPTOR_PATH);
super.addFileset(fs);
}
代码示例来源:origin: jenkinsci/jenkins
File classesJar = new File(destDir, "WEB-INF/lib/classes.jar");
ZipFileSet zfs = new ZipFileSet();
zfs.setProject(prj);
zfs.setSrc(archive);
zfs.setIncludes("WEB-INF/classes/");
代码示例来源:origin: spring-io/initializr
@RequestMapping("/starter.zip")
@ResponseBody
public ResponseEntity<byte[]> springZip(BasicProjectRequest basicRequest)
throws IOException {
ProjectRequest request = (ProjectRequest) basicRequest;
File dir = this.projectGenerator.generateProjectStructure(request);
File download = this.projectGenerator.createDistributionFile(dir, ".zip");
String wrapperScript = getWrapperScript(request);
new File(dir, wrapperScript).setExecutable(true);
Zip zip = new Zip();
zip.setProject(new Project());
zip.setDefaultexcludes(false);
ZipFileSet set = new ZipFileSet();
set.setDir(dir);
set.setFileMode("755");
set.setIncludes(wrapperScript);
set.setDefaultexcludes(false);
zip.addFileset(set);
set = new ZipFileSet();
set.setDir(dir);
set.setIncludes("**,");
set.setExcludes(wrapperScript);
set.setDefaultexcludes(false);
zip.addFileset(set);
zip.setDestFile(download.getCanonicalFile());
zip.execute();
return upload(download, dir, generateFileName(request, "zip"), "application/zip");
}
代码示例来源:origin: org.apache.ant/ant
/**
* A ZipFileset accepts another ZipFileSet or a FileSet as reference
* FileSets are often used by the war task for the lib attribute
* @param p the project to use
* @return the abstract fileset instance
*/
@Override
protected AbstractFileSet getRef(Project p) {
dieOnCircularReference(p);
Object o = getRefid().getReferencedObject(p);
if (o instanceof ZipFileSet) {
return (AbstractFileSet) o;
}
if (o instanceof FileSet) {
ZipFileSet zfs = new ZipFileSet((FileSet) o);
configureFileSet(zfs);
return zfs;
}
String msg = getRefid().getRefId() + " doesn\'t denote a zipfileset or a fileset";
throw new BuildException(msg);
}
代码示例来源:origin: org.apache.ant/ant
final ZipFileSet oldFiles = new ZipFileSet();
oldFiles.setProject(getProject());
oldFiles.setSrc(renamedFile);
oldFiles.setDefaultexcludes(false);
oldFiles.createExclude().setName(addedFile);
oldFiles.getDirectoryScanner(getProject());
((ZipScanner) ds).setEncoding(encoding);
代码示例来源:origin: org.apache.ant/ant
/** Process groupfilesets */
private void processGroupFilesets() {
// Add the files found in groupfileset to fileset
for (FileSet fs : groupfilesets) {
logWhenWriting("Processing groupfileset ", Project.MSG_VERBOSE);
final FileScanner scanner = fs.getDirectoryScanner(getProject());
final File basedir = scanner.getBasedir();
for (String file : scanner.getIncludedFiles()) {
logWhenWriting("Adding file " + file + " to fileset",
Project.MSG_VERBOSE);
final ZipFileSet zf = new ZipFileSet();
zf.setProject(getProject());
zf.setSrc(new File(basedir, file));
add(zf);
filesetsFromGroupfilesets.add(zf);
}
}
}
代码示例来源:origin: jenkinsci/maven-hpi-plugin
rezip.setDestFile(outputFile);
rezip.setProject(new Project());
ZipFileSet z = new ZipFileSet();
z.setSrc(war);
rezip.addZipfileset(z);
throw new UnsupportedOperationException(hpi.getFile()+" is a directory and not packaged yet. this isn't supported");
z = new ZipFileSet();
z.setFile(hpi.getFile());
z.setFullpath("/WEB-INF/plugins/"+hpi.getArtifactId()+".hpi");
rezip.addZipfileset(z);
代码示例来源:origin: net.sf.antenna/antenna
ZipFileSet zip = new ZipFileSet();
zip.setProject(getProject());
zip.setSrc(lib);
zip.createExclude().setName("META-INF/**");
addZipfileset(zip);
代码示例来源:origin: org.apache.geronimo.framework/geronimo-plugin
Zip zip = new Zip();
zip.setDestFile(dest);
ZipFileSet fs = new ZipFileSet();
fs.setDir(source);
fs.setPrefix(serverName);
fs.setProject(project);
zip.addFileset(fs);
archiver = zip;
代码示例来源:origin: org.mobicents.servers.jainslee.core/ant-tasks
ZipFileSet zipFileSet = new ZipFileSet();
zipFileSet.setSrc(classpathFileList[i]);
zipFileSet.setIncludes(urlPath);
super.addZipfileset(zipFileSet);
return;
代码示例来源:origin: stackoverflow.com
task.init();
task.setDestFile(new File(zipFilePath));
ZipFileSet zipFileSet = new ZipFileSet();
zipFileSet.setPrefix("WEB-INF/lib");
zipFileSet.setDir(new File(libsToAddDir));
task.addFileset(zipFileSet);
task.setUpdate(true);
代码示例来源:origin: org.apache.ant/ant
private Stream<ArchiveFileSet> streamArchives() {
final List<ArchiveFileSet> l = new LinkedList<>();
for (final Resource r : zips) {
l.add(configureArchive(new ZipFileSet(), r));
}
for (final Resource r : tars) {
l.add(configureArchive(new TarFileSet(), r));
}
return l.stream();
}
代码示例来源:origin: net.wasdev.wlp.ant/wlp-anttasks
private void updateSourceWar(File jspCompileDir) {
// Finally need to merge the compiled jsps in
War warTask = new War();
warTask.setProject(getProject());
warTask.setDestFile(war);
warTask.setUpdate(true);
ZipFileSet jspFiles = new ZipFileSet();
// The JSPs will be in the a well known location. The
// app name from server.xml and the war file name will
// be
// in the path, the war name minus the .war extension
// (if present) will also be used.
jspFiles.setDir(jspCompileDir);
warTask.addClasses(jspFiles);
warTask.setTaskName(getTaskName());
warTask.execute();
}
代码示例来源:origin: org.apache.ant/ant
/**
* Adds a zipfileset to include in the META-INF directory.
*
* @param fs zipfileset to add
*/
public void addMetainf(ZipFileSet fs) {
// We just set the prefix for this fileset, and pass it up.
fs.setPrefix("META-INF/");
super.addFileset(fs);
}
代码示例来源:origin: stackoverflow.com
ZipFileSet fileSet = new ZipFileSet();
fileSet.setDir(fileToZip);
fileSet.setPrefix(fileToZip.getPath());
代码示例来源:origin: org.apache.ant/ant
/**
* add files under WEB-INF/lib/
* @param fs the zip file set to add
*/
public void addLib(ZipFileSet fs) {
// We just set the prefix for this fileset, and pass it up.
fs.setPrefix("WEB-INF/lib/");
super.addFileset(fs);
}
代码示例来源:origin: org.apache.ant/ant
/**
* set the deployment descriptor to use (WEB-INF/web.xml);
* required unless <tt>update=true</tt>
* @param descr the deployment descriptor file
*/
public void setWebxml(File descr) {
deploymentDescriptor = descr;
if (!deploymentDescriptor.exists()) {
throw new BuildException("Deployment descriptor: does not exist.",
deploymentDescriptor);
}
// Create a ZipFileSet for this file, and pass it up.
ZipFileSet fs = new ZipFileSet();
fs.setFile(deploymentDescriptor);
fs.setFullpath(XML_DESCRIPTOR_PATH);
super.addFileset(fs);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
File classesJar = new File(destDir, "WEB-INF/lib/classes.jar");
ZipFileSet zfs = new ZipFileSet();
zfs.setProject(prj);
zfs.setSrc(archive);
zfs.setIncludes("WEB-INF/classes/");
代码示例来源:origin: org.apache.ant/ant
/**
* Adds zipfileset.
*
* @param fs zipfileset to add
*/
public void addArchives(ZipFileSet fs) {
// We just set the prefix for this fileset, and pass it up.
// Do we need to do this? LH
fs.setPrefix("/");
super.addFileset(fs);
}
代码示例来源:origin: org.mobicents.servers.jainslee.core/ant-tasks
private void processDescriptor(File xmlDtor, String xmlDtorName) {
if (!xmlDtor.exists())
throw new BuildException("Deployment descriptor: " + xmlDtor + " does not exist.");
// Add a new fileset for the DD.
ZipFileSet fs = new ZipFileSet();
fs.setFile(xmlDtor);
fs.setFullpath("META-INF/" + xmlDtorName);
super.addFileset(fs);
}
我想使用 Google OR-Tools 解决车辆路径问题 (vrp),但使用与提供的元启发式不同的元启发式,它们是:贪婪下降、引导局部搜索、模拟退火、禁忌搜索和目标禁忌搜索。这就是此处文档中的解释:
对于 or-tools 中的 VRP,有没有办法让车辆从某些固定位置开始,但允许任意结束位置? 文档 https://developers.google.com/optimization/routin
我创建了新文件“Makefile.local”,并将“WINDOWS_SCIP_DIR=c:/Program Files/SCIPOptSuite”添加到文件中。 SCIP也编译成功,文件路径正确。
这个问题在这里已经有了答案: What are the Android SDK build-tools, platform-tools and tools? And which version sh
我正在尝试在 OR-TOOLS RL VRPTW 问题中强制执行位移长度约束。类次时长是车辆在服务中的总时间(运输 + 等待 + 服务),从到达第一个位置到离开最后一个位置。 它看起来像一个 Time
我正在尝试在 OR-TOOLS RL VRPTW 问题中强制执行位移长度约束。类次时长是车辆在服务中的总时间(运输 + 等待 + 服务),从到达第一个位置到离开最后一个位置。 它看起来像一个 Time
命令后: go build 显示错误: go tool: no such tool "link" 详细信息:我的系统是 windows 10 -> 64 位 go version: 1.11.5
我已经在我的 Ubuntu 桌面上安装了 go,在我关闭计算机之前它运行良好。 现在,当我启动我的机器并继续我的项目工作时,我明白了 $ go build go tool: no such tool
我正在为 Job-Shop 问题实现一个类似的解决方案,但有一个区别:我不知道必须执行每项任务的机器。解决这个问题也是问题的一部分。事实上,我们可以说,我正在尝试解决护士问题和工作车间问题的组合。 更
我知道Spring Tool Suite是为Spring开发而优化的,而Groovy / Grails是为Groovy / Grails开发的而优化的。 Groovy / Grails开发人员是否愿意
在 Chrome Dev Tools 中,我可以 Shift+单击检查器中的颜色来更改格式(Hex -> RGB -> HSL)。我可以在 Firefox Dev Tools 中做到这一点吗?我可以在
我目前正在评估谷歌或工具,只是注意到它本身并不是真正的求解器,而主要是与其他求解器的接口(interface)。我想知道的是这个框架使用哪些求解器来解决约束和路由问题。 我已经看透了https://d
我正在尝试使用命令 firebase init 初始化 Firebase 项目,但我收到消息 Error: Command requires authentication, please run fi
是什么决定了工具进入特定目录?例如,adb 位于 tools/但已移至 platform-tools/。为什么他们不能在同一个目录中? 最佳答案 platform-tools/ 主要包含从 Windo
我刚刚将 Android Studio 更新到了 2.3 版(金丝雀版)和最后的构建工具 'com.android.tools.build:gradle:2.3.0-alpha1' 以及当我打开布局并
我一直在使用 SQL Server 项目来管理数据库的结构。 首先我创建了项目,然后导入了一个数据库。 然后,当我需要更改架构时,比如更改字段名称,我会在 SQL Server 项目中进行,然后使用架
我正在尝试使用 Google OR-Tools 的 CP-Solver 解决问题。是否可以添加这样的约束:x1 异或 x2 异或 x3 == 0提前致谢。 最佳答案 AddBoolXOr of n 个
我需要为此获取源代码,但不幸的是,我无法在 jquerytools.org 上找到它的链接。该站点上的论坛也已关闭。有谁知道我可以从哪里获得这个来源或取消缩小它? 谢谢,罗布 最佳答案 你有没有试过继
我需要为此获取源代码,但不幸的是,我无法在 jquerytools.org 上找到它的链接。该站点上的论坛也已关闭。有谁知道我可以从哪里获得这个来源或取消缩小它? 谢谢,罗布 最佳答案 你有没有试过继
我正在使用Spring Tool Suite: 版本:3.9.0.RELEASE 建立编号:201707061903 平台:Eclipse Neon.3(4.6.3) 并安装了Gradle插件: Bu
我是一名优秀的程序员,十分优秀!