use of org.apache.tools.ant.DirectoryScanner in project tomcat by apache.
the class SignCode method execute.
@Override
public void execute() throws BuildException {
List<File> filesToSign = new ArrayList<>();
// signed.
for (FileSet fileset : filesets) {
DirectoryScanner ds = fileset.getDirectoryScanner(getProject());
File basedir = ds.getBasedir();
String[] files = ds.getIncludedFiles();
if (files.length > 0) {
for (int i = 0; i < files.length; i++) {
File file = new File(basedir, files[i]);
filesToSign.add(file);
}
}
}
try {
String signingSetID = makeSigningRequest(filesToSign);
downloadSignedFiles(filesToSign, signingSetID);
} catch (SOAPException | IOException e) {
throw new BuildException(e);
}
}
use of org.apache.tools.ant.DirectoryScanner in project hibernate-orm by hibernate.
the class SchemaExportTask method getFiles.
private String[] getFiles() {
List<String> files = new LinkedList<String>();
for (FileSet fileSet : fileSets) {
final DirectoryScanner ds = fileSet.getDirectoryScanner(getProject());
final String[] dsFiles = ds.getIncludedFiles();
for (String dsFileName : dsFiles) {
File f = new File(dsFileName);
if (!f.isFile()) {
f = new File(ds.getBasedir(), dsFileName);
}
files.add(f.getAbsolutePath());
}
}
return ArrayHelper.toStringArray(files);
}
use of org.apache.tools.ant.DirectoryScanner in project hibernate-orm by hibernate.
the class SchemaUpdateTask method collectFiles.
private String[] collectFiles() {
List<String> files = new LinkedList<String>();
for (FileSet fileSet : fileSets) {
final DirectoryScanner ds = fileSet.getDirectoryScanner(getProject());
final String[] dsFiles = ds.getIncludedFiles();
for (String dsFileName : dsFiles) {
File f = new File(dsFileName);
if (!f.isFile()) {
f = new File(ds.getBasedir(), dsFileName);
}
files.add(f.getAbsolutePath());
}
}
return ArrayHelper.toStringArray(files);
}
use of org.apache.tools.ant.DirectoryScanner in project hibernate-orm by hibernate.
the class SchemaValidatorTask method collectFiles.
private String[] collectFiles() {
List<String> files = new ArrayList<String>();
for (Object fileSet : fileSets) {
final FileSet fs = (FileSet) fileSet;
final DirectoryScanner ds = fs.getDirectoryScanner(getProject());
for (String dsFile : ds.getIncludedFiles()) {
File f = new File(dsFile);
if (!f.isFile()) {
f = new File(ds.getBasedir(), dsFile);
}
files.add(f.getAbsolutePath());
}
}
return ArrayHelper.toStringArray(files);
}
use of org.apache.tools.ant.DirectoryScanner in project processing by processing.
the class AppBundlerTask method copyLibraryPathEntries.
private void copyLibraryPathEntries(File macOSDirectory) throws IOException {
for (FileSet fileSet : libraryPath) {
File libraryPathDirectory = fileSet.getDir();
DirectoryScanner directoryScanner = fileSet.getDirectoryScanner(getProject());
String[] includedFiles = directoryScanner.getIncludedFiles();
for (String includedFile : includedFiles) {
File source = new File(libraryPathDirectory, includedFile);
File destination = new File(macOSDirectory, new File(includedFile).getName());
copy(source, destination);
}
}
}
Aggregations