Java Code Examples for org.apache.tools.ant.taskdefs.Delete#setDir()
The following examples show how to use
org.apache.tools.ant.taskdefs.Delete#setDir() .
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: IvyCacheFilesetTest.java From ant-ivy with Apache License 2.0 | 5 votes |
@Test public void testWithoutPreviousResolveAndNonDefaultCache() { File cache2 = new File("build/cache2"); cache2.mkdirs(); try { project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-simple.xml"); fileset.setSetid("simple-setid"); System.setProperty("ivy.cache.dir", cache2.getAbsolutePath()); fileset.execute(); Object ref = project.getReference("simple-setid"); assertNotNull(ref); assertTrue(ref instanceof FileSet); FileSet fs = (FileSet) ref; DirectoryScanner directoryScanner = fs.getDirectoryScanner(project); assertEquals(1, directoryScanner.getIncludedFiles().length); assertEquals( getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar", cache2) .getAbsolutePath(), new File(directoryScanner.getBasedir(), directoryScanner.getIncludedFiles()[0]).getAbsolutePath()); } finally { Delete del = new Delete(); del.setProject(new Project()); del.setDir(cache2); del.execute(); } }
Example 2
Source File: RetrieveTest.java From ant-ivy with Apache License 2.0 | 5 votes |
@After public void tearDown() { TestHelper.cleanCache(); Delete del = new Delete(); del.setProject(new Project()); del.setDir(new File("build/test/retrieve")); del.execute(); }
Example 3
Source File: DefaultRepositoryCacheManagerTest.java From ant-ivy with Apache License 2.0 | 5 votes |
@After public void tearDown() { IvyContext.popContext(); Delete del = new Delete(); del.setProject(new Project()); del.setDir(cacheManager.getRepositoryCacheRoot()); del.execute(); }
Example 4
Source File: AntFile.java From antiplag with Apache License 2.0 | 5 votes |
public static int deleteDir(File f){ int res = -1; try { Project prj=new Project(); Delete delete=new Delete(); delete.setProject(prj); delete.setDir(f); //��ͬʱ����Ŀ¼�������ļ�ɾ�� delete.execute(); res = 1; } catch (BuildException e) { // TODO Auto-generated catch block e.printStackTrace(); } return res; }
Example 5
Source File: IvyDeliverTest.java From ant-ivy with Apache License 2.0 | 4 votes |
private void cleanTestDir() { Delete del = new Delete(); del.setProject(new Project()); del.setDir(new File("build/test/deliver")); del.execute(); }
Example 6
Source File: IvyDeliverTest.java From ant-ivy with Apache License 2.0 | 4 votes |
private void cleanRetrieveDir() { Delete del = new Delete(); del.setProject(new Project()); del.setDir(new File("build/test/retrieve")); del.execute(); }
Example 7
Source File: IvyDeliverTest.java From ant-ivy with Apache License 2.0 | 4 votes |
private void cleanRep() { Delete del = new Delete(); del.setProject(new Project()); del.setDir(new File("test/repositories/1/apache")); del.execute(); }
Example 8
Source File: IvyPublishTest.java From ant-ivy with Apache License 2.0 | 4 votes |
private void cleanRep() { Delete del = new Delete(); del.setProject(new Project()); del.setDir(new File("test/repositories/1/apache")); del.execute(); }
Example 9
Source File: TestHelper.java From ant-ivy with Apache License 2.0 | 4 votes |
public static void cleanCache() { Delete del = new Delete(); del.setProject(new Project()); del.setDir(cache); del.execute(); }
Example 10
Source File: TestPerformance.java From ant-ivy with Apache License 2.0 | 4 votes |
private void cleanRepo() { Delete del = new Delete(); del.setProject(new Project()); del.setDir(new File("build/test/perf")); del.execute(); }
Example 11
Source File: InstallTest.java From ant-ivy with Apache License 2.0 | 4 votes |
private void cleanInstall() { Delete del = new Delete(); del.setProject(new Project()); del.setDir(new File("build/test/install")); del.execute(); }