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

Grape's @GrabConfig systemProperties set too late

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5.6
    • None
    • Grape
    • None

    Description

      This minimalistic example with @GrabConfig(systemProperties='ivy.message.logger.level=3') does not cause logging output to be produced, i.e. Grape.grab(...) does not execute with the additional systemProperties being set.

      @GrabConfig(systemProperties='ivy.message.logger.level=3')
      @Grab(group='commons-lang', module='commons-lang', version='2.6')
      import org.apache.commons.lang.StringUtils
      assert StringUtils.name == 'org.apache.commons.lang.StringUtils'
      

      On setting properties explicitly before the grab() in GrabAnnotationTransformation.java as done in the attached version of the class, it works as expected, but of course is not a proper fix  

      The properties are only set by the ResolveVisitor after the Ivy dependency resolution completed, which is too late for being effective for Grape grabbing dependencies.

      This bug is problematic in our enterprise setup where we try to configure proxy settings through a @GrabConfig(systemProperties='http.proxyHost=10.0.0.100,... annotation.

      Attachments

        Activity

          People

            Unassigned Unassigned
            thabach Christian Bach
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: