Skip Navigation

Unpacking and Copying Resources from a Plug-in

  1. Add the com.sabre.edge.redapp.pluginresources extension point to define the paths of the files within the plug-in.

        The sample below shows the syntax for plugin.xml.

      point="com.sabre.edge.redapp.pluginresources" >
            <file override="true" path="sample.txt" />


        In the files element, add one file child element with override and path attributes for each file.

        Define a Boolean value for the override attribute.

  •         A value of true overwrites the existing resource in path with the newer resources in the plug-in.

  •         A value of false does not override the existing resources that are defined in path.

If this is a new plug-in with files that you want to unpack and copy, set override to false.

If you want to override existing files, set override to true and update path with the new file.

        In path, add the location or name of the resource.

        A warning occurs if you are using multiple files in the files element in the com.sabre.edge.redapp.pluginresources extension point. Ignore the warning as a workaround. The functionality is not affected.

  1. If you have a local webpage that is a URL, add a resources element with a url attribute to plugin.xml.

        For url, use the ${plugin_resources}/data variable to define the path to the resources that you want to update. An example is shown below.

<resources url="${plugin_resources}/data" />

        ${plugin_resources} points to the directory in the plug-in.

        Example:   Add "${plugin_resources}/someResource.html", where someResource.html is the name of the web page to point to. If the override attribute is true, it replaces data. This is unpacked and copied when the plug-in is run.

You can use a web address for url.

  1. Add these files and resources to in the plug-in.