Java Code Examples for org.apache.tools.ant.types.FileSet#setFile()
The following examples show how to use
org.apache.tools.ant.types.FileSet#setFile() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UploadFileSetToS3TaskTests.java From aws-ant-tasks with Apache License 2.0 | 6 votes |
@Test public void testExecuteSingleFile() throws FileNotFoundException, IOException { UploadFileSetToS3Task task = new UploadFileSetToS3Task(); task.setProject(new Project()); FileSet fileset = new FileSet(); fileset.setDir(testFile1.getParentFile()); fileset.setFile(testFile1); task.addFileset(fileset); task.setBucketName(BUCKET_NAME); task.setKeyPrefix(KEY_PREFIX); task.execute(); resFile1 = File.createTempFile(RES_FILE_1, TESTFILE_SUFFIX); client.getObject(new GetObjectRequest(BUCKET_NAME, KEY_PREFIX + fileName1), resFile1); assertTrue(FileUtils.contentEquals(testFile1, resFile1)); }
Example 2
Source File: JarExpander.java From PoseidonX with Apache License 2.0 | 5 votes |
private FileSet createFileSetForJarFile(File jarFile, Project prj) { FileSet fileSet = new FileSet(); fileSet.setProject(prj); fileSet.setFile(jarFile); return fileSet; }
Example 3
Source File: DownloadBinariesTest.java From netbeans with Apache License 2.0 | 5 votes |
private void downloadBinaries(boolean clean) { DownloadBinaries task = new DownloadBinaries(); task.setProject(new Project()); task.setCache(cache); task.setClean(clean); task.setServer(server.toURI().toString()); FileSet manifest = new FileSet(); manifest.setFile(list); task.addManifest(manifest); task.execute(); }
Example 4
Source File: IvyBuildList.java From ant-ivy with Apache License 2.0 | 4 votes |
private void addBuildFile(Path path, File buildFile) { FileSet fs = new FileSet(); fs.setFile(buildFile); path.addFileset(fs); }
Example 5
Source File: EtlExecuteTask.java From scriptella-etl with Apache License 2.0 | 4 votes |
public void setFile(final String fileName) throws FileNotFoundException { FileSet f = new FileSet(); f.setFile(launcher.resolveFile(null, fileName)); filesets.add(f); }