Package org.apache.tools.ant.types

Examples of org.apache.tools.ant.types.Path.list()


        if (scriptExtensions.isEmpty()) {

            scriptExtensions.add(getScriptExtension().substring(2)); // first extension will be the one set explicitly on <groovyc>

            Path classpath = getClasspath() != null ? getClasspath() : new Path(getProject());
            final String[] pe = classpath.list();
            final GroovyClassLoader loader = new GroovyClassLoader(getClass().getClassLoader());
            for (String file : pe) {
                loader.addClasspath(file);
            }
            scriptExtensions.addAll(SourceExtensionHandler.getRegisteredExtensions(loader));
View Full Code Here


        +classPathRef.getRefId() +"'.", Project.MSG_DEBUG);

    String[] pathElements = null;
    try {
      final Path path = (Path) classPathRef.getReferencedObject();
      pathElements = path.list();
    } catch (BuildException e) {
      // Unsatisfied ref in the given path; can not expand.
      // Make the new path a reference to the old one.
      log("Unresolvable reference in '" +classPathRef.getRefId()
          +"' can not expand bundle names in it.", Project.MSG_WARN);
View Full Code Here

        result = isAspectjtoolsjar(cps[i]);
      }
    }
    if (null == result) {
      final Path classpath = Path.systemClasspath;
      final String[] paths = classpath.list();
      for (int i = 0; (i < paths.length) && (null == result); i++) {
        result = isAspectjtoolsjar(paths[i]);
      }
    }
    return (null == result ? null : result.getAbsoluteFile());
View Full Code Here

          File file = new File(path, fileName);
          lastModified = Math.max(getLastModifiedTime(file), lastModified);
        }
      } else if (entry instanceof Path) {
        Path path = (Path) entry;
        for (String src : path.list()) {
          File file = new File(src);
          lastModified = Math.max(getLastModifiedTime(file), lastModified);
        }
      }
    }
View Full Code Here

        if (p == null)
        {
            throw new BuildException(value + "is not a path reference.");
        }

        String[] paths = p.list();
        classpath = new File[paths.length];
        for (int i = 0; i < paths.length; ++i)
        {
            classpath[i] = new File(paths[i]);
        }
View Full Code Here

              FileUtils fu = FileUtils.newFileUtils();
              for(Iterator iterator = paths.iterator(); iterator.hasNext();)
              {
                  Path path = (Path)iterator.next();
                  String pathElements[] = path.list();
                  int i = 0;
                  while(i < pathElements.length)
                  {
                      String pathElement = pathElements[i];
                      URL url;
View Full Code Here

        assertNotNull(ref);
        assertTrue(ref instanceof Path);
        Path p = (Path) ref;
        assertEquals(1, p.size());
        assertEquals(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar")
                .getAbsolutePath(), new File(p.list()[0]).getAbsolutePath());
    }

    public void testInline1() throws Exception {
        // we first resolve another ivy file
        IvyResolve resolve = new IvyResolve();
View Full Code Here

        assertNotNull(ref);
        assertTrue(ref instanceof Path);
        Path p = (Path) ref;
        assertEquals(1, p.size());
        assertEquals(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar")
                .getAbsolutePath(), new File(p.list()[0]).getAbsolutePath());
    }

    public void testInline2() throws Exception {
        // we first resolve a dependency directly
        path.setOrganisation("org1");
View Full Code Here

        assertNotNull(ref);
        assertTrue(ref instanceof Path);
        Path p = (Path) ref;
        assertEquals(1, p.size());
        assertEquals(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar")
                .getAbsolutePath(), new File(p.list()[0]).getAbsolutePath());

        // we then resolve another ivy file
        IvyResolve resolve = new IvyResolve();
        resolve.setProject(project);
        resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-latest.xml"));
View Full Code Here

        assertNotNull(ref);
        assertTrue(ref instanceof Path);
        Path p = (Path) ref;
        assertEquals(1, p.size());
        assertEquals(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar")
                .getAbsolutePath(), new File(p.list()[0]).getAbsolutePath());
    }

    public void testWithResolveIdWithoutResolve() throws Exception {
        Project otherProject = new Project();
        otherProject.setProperty("ivy.settings.file", "test/repositories/ivysettings.xml");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.