Package org.apache.tools.ant

Examples of org.apache.tools.ant.AntClassLoader$ResourceEnumeration


    JRProperties.backupProperties();
   
    try
    {
      AntClassLoader classLoader = null;
      if (classpath != null)
      {
        JRProperties.setProperty(JRProperties.COMPILER_CLASSPATH, String.valueOf(classpath));
       
        ClassLoader parentClassLoader = getClass().getClassLoader();
        classLoader = new AntClassLoader(parentClassLoader, getProject(), classpath, true);
        classLoader.setThreadContextLoader();
      }

      try
      {
        /*   */
        scanSrc();
        /*   */
        decompile();
      }
      finally
      {
        if (classLoader != null)
        {
          classLoader.resetThreadContextLoader();
        }       
      }     
    }
    finally
    {
View Full Code Here


   
    try
    {
      JRProperties.setProperty(JRProperties.COMPILER_XML_VALIDATION, xmlvalidation);//FIXME is this needed?

      AntClassLoader classLoader = null;
      if (classpath != null)
      {
        JRProperties.setProperty(JRProperties.COMPILER_CLASSPATH, String.valueOf(classpath));
       
        ClassLoader parentClassLoader = getClass().getClassLoader();
        classLoader = new AntClassLoader(parentClassLoader, getProject(), classpath, true);
        classLoader.setThreadContextLoader();
      }

      try
      {
        /*   */
        scanSrc();
        /*   */
        update();
      }
      finally
      {
        if (classLoader != null)
        {
          classLoader.resetThreadContextLoader();
        }       
      }     
    }
    finally
    {
View Full Code Here

    JRProperties.backupProperties();
   
    try
    {
      AntClassLoader classLoader = null;
      if (classpath != null)
      {
        JRProperties.setProperty(JRProperties.COMPILER_CLASSPATH, String.valueOf(classpath));
       
        ClassLoader parentClassLoader = getClass().getClassLoader();
        classLoader = new AntClassLoader(parentClassLoader, getProject(), classpath, true);
        classLoader.setThreadContextLoader();
      }

      try
      {
        /*   */
        scanSrc();
       
        if (runApi)
        {
          /*   */
          runApi();
        }
        else
        {
          /*   */
          writeApi();
        }
      }
      finally
      {
        if (classLoader != null)
        {
          classLoader.resetThreadContextLoader();
        }       
      }     
    }
    finally
    {
View Full Code Here

   
    try
    {
      //JRProperties.setProperty(JRProperties.COMPILER_XML_VALIDATION, xmlvalidation);//FIXME is this needed?

      AntClassLoader classLoader = null;
      if (classpath != null)
      {
        JRProperties.setProperty(JRProperties.COMPILER_CLASSPATH, String.valueOf(classpath));
       
        ClassLoader parentClassLoader = getClass().getClassLoader();
        classLoader = new AntClassLoader(parentClassLoader, getProject(), classpath, true);
        classLoader.setThreadContextLoader();
      }

      try
      {
        /*   */
        scanSrc();
        /*   */
        export();
      }
      finally
      {
        if (classLoader != null)
        {
          classLoader.resetThreadContextLoader();
        }       
      }     
    }
    finally
    {
View Full Code Here

      setCompilerClass(compiler);

      JRProperties.setProperty(JRProperties.COMPILER_XML_VALIDATION, xmlvalidation);

      AntClassLoader classLoader = null;
      if (classpath != null)
      {
        JRProperties.setProperty(JRProperties.COMPILER_CLASSPATH, String.valueOf(classpath));
       
        ClassLoader parentClassLoader = getClass().getClassLoader();
        classLoader = new AntClassLoader(parentClassLoader, getProject(), classpath, true);
        classLoader.setThreadContextLoader();
      }

      try
      {
        /*   */
        scanSrc();
        /*   */
        compile();
      }
      finally
      {
        if (classLoader != null)
        {
          classLoader.resetThreadContextLoader();
        }       
      }     
    }
    finally
    {
View Full Code Here

     */
    public void execute()
    {
        validateParameters();

        final AntClassLoader classLoader =
            new AntClassLoader( getProject(), m_classpath );
        boolean valid = true;

        final List classes = getClassesWithMetaData();
        log( "Verifying " + classes.size() + " components." );
        final Iterator iterator = classes.iterator();
View Full Code Here


    protected GroovyClassLoader buildClassLoaderFor() {
        ClassLoader parent = getIncludeantruntime()
                ? getClass().getClassLoader()
                : new AntClassLoader(new RootLoader(new URL[0], null), getProject(), getClasspath());
        if (parent instanceof AntClassLoader) {
            AntClassLoader antLoader = (AntClassLoader) parent;
            String[] pathElm = antLoader.getClasspath().split(File.pathSeparator);
            List<String> classpath = configuration.getClasspath();
            /*
             * Iterate over the classpath provided to groovyc, and add any missing path
             * entries to the AntClassLoader.  This is a workaround, since for some reason
             * 'directory' classpath entries were not added to the AntClassLoader' classpath.
             */
            for (String cpEntry : classpath) {
                boolean found = false;
                for (String path : pathElm) {
                    if (cpEntry.equals(path)) {
                        found = true;
                        break;
                    }
                }
                /*
                 * fix for GROOVY-2284
                 * seems like AntClassLoader doesn't check if the file
                 * may not exist in the classpath yet
                 */
                if (!found && new File(cpEntry).exists())
                    antLoader.addPathElement(cpEntry);
            }
        }

        GroovyClassLoader loader = new GroovyClassLoader(parent, configuration);
        // in command line we don't need to do script lookups
View Full Code Here

    }

    m_bundleCounters = new HashMap<ResourceBundleDefinition, MutableInteger>();
    m_helpdocCounters = new HashMap<ResourceBundleDefinition, MutableInteger>();

    AntClassLoader classloader = new AntClassLoader(this.getClass().getClassLoader(), getProject(), m_classpath, true);
    classloader.setIsolated(false);

    List<String> class_files = getClassesFromFileSets(m_classFilesets);
    for (String class_file : class_files) {
      try {
        class_file = getClassNameFromClassFile(class_file);
        System.out.println(class_file);
//        if (class_file.endsWith(".class") == true) {
          logMsgIfVerbose(I18N_PROCESSING_CLASS, class_file);
          Class clazz = classloader.loadClass(class_file);
          logMsgIfVerbose(I18N_LOADED_CLASS, clazz);

          if (processI18NClass(clazz) == false) {
            logMsgIfVerbose(I18N_CLASS_IGNORED, clazz);
          }
View Full Code Here

   */
  public static File findAspectjtoolsJar() {
    File result = null;
    ClassLoader loader = AjcTask.class.getClassLoader();
    if (loader instanceof AntClassLoader) {
      AntClassLoader taskLoader = (AntClassLoader) loader;
      String cp = taskLoader.getClasspath();
      String[] cps = LangUtil.splitClasspath(cp);
      for (int i = 0; (i < cps.length) && (null == result); i++) {
        result = isAspectjtoolsjar(cps[i]);
      }
    }
View Full Code Here

            {
                log("Loading " + driver
                        + " using AntClassLoader with classpath " + classpath,
                        Project.MSG_VERBOSE);

                loader = new AntClassLoader(project, classpath);
                dc = loader.loadClass(driver);
            }
            else
            {
                log("Loading " + driver + " using system loader.",
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.AntClassLoader$ResourceEnumeration

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.