Skip to end of banner
Go to start of banner

How to Add a ClassPath in a Groovy Macro Using the Scripting for Confluence app

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Users may not receive error notifications when an incorrect ClassPath is specified in scripting environments such as Groovy macro from the Scripting for Confluence app. This issue can lead to confusion about whether the specified jar files are being used.

Resolution Steps:

  1. Verify the ClassPath:
    Ensure the ClassPath includes the full path to each required jar file. For example:

    /path/to/confluence/WEB-INF/lib/confluence-8.5.5.jar:/path/to/confluence/WEB-INF/lib/core-8.0.1.jar

    An example path:

    /opt/atlassian/confluence/confluence/WEB-INF/lib/com.atlassian.confluence_confluence-8.6.2.jar:/opt/atlassian/confluence/confluence/WEB-INF/lib/com.atlassian.core_atlassian-core-8.0.1.jar

    i.e. add the confluence Jar followed by the core Jar path separated by colon (:) as shown above.

    2024-05-24_11-55-16-20240524-062620.png
  2. Check File Existence:
    Confirm that all jar files listed in your ClassPath actually exist in the specified locations on the server.

  3. Use Multiple Jar Files:
    If multiple jar files are needed, include them in the ClassPath separated by a colon (:).

  4. Testing and Validation:
    Currently, there is no automated validation for the ClassPath field within the macro setup. Manually test the script to ensure it executes as expected, which confirms the ClassPath is correctly set.

  • No labels