Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6768

Unable to resolve resources from grapes through ClassLoader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.3.1
    • Grape
    • None

    Description

      With Groovy 2.3.0, is appears not to be possible to resolve resources from Grapes via the classloader.

      I access the classloader through

      Thread.currentThread().getContextClassLoader();
      

      In Groovy 2.3.0, this returns a org.codehaus.groovy.tools.RootLoader which does not seem to know about Grapes.

      In Groovy 2.2.2 and before, it returns a groovy.lang.GroovyClassLoader which knows about Grapes.

      Resources are then resolved e.g. using

      classloader.getResources("META-INF/org.apache.uima.fit/types.txt")
      

      In Groovy 2.3.0, this returns no resources. In Groovy 2.2.2 it successfully locates the resources. This is with the same script, same Grape cache, same JDK, just different versions of Groovy used.

      Related reports:

      Attachments

        Issue Links

          Activity

            People

              melix Cédric Champeau
              rec Richard Eckart de Castilho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: