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(); }
/** * A TarFileset accepts another TarFileSet 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 TarFileSet) { return (AbstractFileSet) o; } if (o instanceof FileSet) { TarFileSet zfs = new TarFileSet((FileSet) o); configureFileSet(zfs); return zfs; } String msg = getRefid().getRefId() + " doesn\'t denote a tarfileset or a fileset"; throw new BuildException(msg); }
tar.setLongfile(fileMode); tar.setDestFile(dest); TarFileSet rc = new TarFileSet(); rc.setDir(source); rc.setPrefix(serverName); tar.add(rc); rc = new TarFileSet(); rc.setDir(source); rc.setPrefix(serverName); tar.add(rc); rc = new TarFileSet(); rc.setDir(source); rc.setPrefix(serverName);