Package org.apache.tools.ant.types

Examples of org.apache.tools.ant.types.Path


        }
    }

    public Path createClasspath() {
        return (classpath == null ?
                classpath = new Path(getProject()) :
                classpath).createPath();
    }
View Full Code Here


        }
    }

    public Path createBootclasspath() { // todo: unsupported
        return (bootclasspath == null ?
                bootclasspath = new Path(getProject()) :
                bootclasspath).createPath();
    }
View Full Code Here

        }
    }

    public Path createInternalclasspath() {
        if (internalclasspath == null) {
            internalclasspath = new Path(getProject());
        }
        return internalclasspath.createPath();
    }
View Full Code Here

         docletpath).append(path);
    }

    public Path createDocletpath() {
        return docletpath == null ?
            (docletpath = new Path(getProject())) :
            docletpath.createPath();
    }
View Full Code Here

                this.path.append(path);
            }
        }
        public Path createPath() {
            return (path == null ?
                    path = new Path(getProject()) :
                    path).createPath();
        }
View Full Code Here

          } else {
          cmd.createArgument().setValue(Util.EMPTY_STRING);
          }
        }

        Path classpath = new Path(this.project);

       /*
         * Eclipse compiler doesn't support -extdirs.
         * It is emulated using the classpath. We add extdirs entries after the
         * bootclasspath.
         */
        if (this.extdirs != null) {
      cmd.createArgument().setValue("-extdirs"); //$NON-NLS-1$
      cmd.createArgument().setPath(this.extdirs);         
        }

    /*
     * The java runtime is already handled, so we simply want to retrieve the
     * ant runtime and the compile classpath.
     */
        classpath.append(getCompileClasspath());

        // For -sourcepath, use the "sourcepath" value if present.
        // Otherwise default to the "srcdir" value.
        Path sourcepath = null;
       
        // retrieve the method getSourcepath() using reflect
        // This is done to improve the compatibility to ant 1.5
        Method getSourcepathMethod = null;
        try {
          getSourcepathMethod = javacClass.getMethod("getSourcepath", null); //$NON-NLS-1$
        } catch(NoSuchMethodException e) {
          // if not found, then we cannot use this method (ant 1.5)
        }
        Path compileSourcePath = null;
        if (getSourcepathMethod != null) {
       try {
        compileSourcePath = (Path) getSourcepathMethod.invoke(this.attributes, null);
      } catch (IllegalAccessException e) {
        // should never happen
View Full Code Here

     */
    public Path createClasspath()
    {
        if (this.classpath == null)
        {
            this.classpath = new Path(project);
        }
        return this.classpath.createPath();
    }
View Full Code Here

     * without having to specify them directly.
     *
     * @since Ant 1.4
     */
    public void init() {
        antRuntimeClasses = new Path(getProject());
        splitJUnit = !addClasspathResource("/junit/framework/TestCase.class");
        addClasspathEntry("/org/apache/tools/ant/launch/AntMain.class");
        addClasspathEntry("/org/apache/tools/ant/Task.class");
        addClasspathEntry("/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.class");
        addClasspathEntry("/org/apache/tools/ant/taskdefs/optional/junit/JUnit4TestMethodAdapter.class");
View Full Code Here

     * @since Ant 1.7.1
     */
    protected void setupJUnitDelegate() {
        final ClassLoader myLoader = JUnitTask.class.getClassLoader();
        if (splitJUnit) {
            final Path path = new Path(getProject());
            path.add(antRuntimeClasses);
            Path extra = getCommandline().getClasspath();
            if (extra != null) {
                path.add(extra);
            }
            mirrorLoader = (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
                public Object run() {
View Full Code Here

        if (includeAntRuntime) {
            Map/*<String, String>*/ env = Execute.getEnvironmentVariables();
            String cp = (String) env.get(CLASSPATH);
            if (cp != null) {
                cmd.createClasspath(getProject()).createPath()
                    .append(new Path(getProject(), cp));
            }
            log("Implicitly adding " + antRuntimeClasses + " to CLASSPATH",
                Project.MSG_VERBOSE);
            cmd.createClasspath(getProject()).createPath()
                .append(antRuntimeClasses);
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.types.Path

Copyright © 2018 www.massapicom. 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.