A Resource is defined in a dedicated directory under plugins root/plugins/resources. The directory should be named with the pattern TOOL_VERSION. Please note that this pattern is specific to resources. Under each plugin directory, one finds the configuration file (config.xml) and optional files. For instance, the GOBY_DEV resource directory contains:

ls server-conf/plugins/resources/GOBY_DEV
config.xml	goby.jar

Configuration

A Resource configuration is an XML file named config.xml that must follow these rules:

  1. the root element is named resourceConfig
  2. the XML document is valid against the XML Schema at plugins root/schemas/plugins.xsd

The file config.xml contains the following:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resourceConfig>
<name>Goby</name>
<id>GOBY</id>
<help>Goby framework and toolbox. See http://goby.campagnelab.org.</help>
<version>20111024133413</version>
<files>
<file>
<id>GOBY_JAR</id>
<filename>goby.jar</filename>
</file>
</files>
</resourceConfig>

The first part of the configuration reports the metadata common to all the plugins types (name, id, help, version).

This config file defines a resource called Goby, with identifier GOBY and version number 20111024133413. A help message is given that can be presented to the end user. This resource defines one file, with identifier GOBY_JAR and name goby.jar. The identifier can be used to import the resource in other plugins.

For instance, these statements in an aligner or analysis plugin definition file will cause the GOBY resource to be imported if such a resource can be found with version number larger or equal to 20111021144833:

<requires>
        <resource>
            <id>GOBY</id>
            <version-at-least>20111021144833</version-at-least>
        </resource>
</requires>

Version numbers have the general format long (. long )+, so 20111021144833 is a valid number, as well as 1.2.0.0.1. Version numbers are compared such that 1.2.0.1.0 is a larger version number as 1.2.0.0.1, as would be expected.

Since GobyWeb 2.1, resource plugins support artifacts. Artifacts are defined as follows:

<artifacts>
   <artifact id="INSTALL_DIR" order="1"/>
   <artifact id="VEP_CACHE" order="1">
     <attributes>
      <attribute name="organism"/>
      <attribute name="ensembl-version-number"/>
     </attributes>
   </artifact>
</artifacts>