Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18926

Script macro doesn't load attached JARs when using the "jars" parameter

    XMLWordPrintable

    Details

    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Follow this steps to reproduce:

      • Create a new page with this code and save:
        {{groovy}}
        import com.stripe.Stripe;
        {{/groovy}}
        
      • You should get an exception "unable to resolve class com.stripe.Stripe" as expected
      • Download the JAR attached to this issue and attach it to your page
      • Modify the page code to:
        {{groovy jars="attach:stripe-java-20.30.0.jar"}}
        import com.stripe.Stripe;
        {{/groovy}}
        

      Expected: don't get any exception.
      Actual: you still get the "unable to resolve class com.stripe.Stripe", which seems to indicate that the Groovy (Script) macro didn't manage to load the indicated JAR from the page attachments.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: