Commons component plugin - Resources

This subsection introduces you to the Resources shipped with the commons-components basic plugin. The most nitpicking of you will notice that the file resource category is part of the core of SKF and doesn’t need the plugin to be available. Nevertheless it is stated here for convenience.

Most of the resources here will start their careers as file resource, then will be converted to their type using converters. Some of them can also be produced as the result of a command (for instance result.sql).

Since most of the resources will be materialized as a file in your test project, you might be wondering what file corresponds to complex resources (conf.dbunit for instance). You will NOT find that information here, because there are potentially unlimited ways to create that resource, not just one file format. In other words, one could imagine that a given resource could be constructed from other resources involving completely different material. A good example is the dataset.dbunit resource : the Database Plugin provides three ways of creating one of these.

In fact, the question of how to obtain a resource, given another resource, is typically the job of the converters. If you’re interested in what you should supply as inputs to the system in order to produce the resources you want, you should check the ‘Converters’ section, located in the ‘Advanced Users’ section of each plugin. In the case of our dataset.dbunit example, the answer you look for is in this section.


file

Category-name : file

What ?

file is a resource type representing a plain file or a directory, no assumption made on the content of either of them.



bundle

Category-name : bundle

What ?

bundle is a resource type representing a set of files. Basically it is a directory containing more directories or files. The root directory is called the ‘base’. However it also have additional attributes. Those attributes give clues on what is the relationships between the files it embeds.

The followig attribute is available :

  • mainpath : denotes which file is considered to be the main file, and the other files represent its dependencies. The mainpath is the path relative to the base of the bundle. When used, the context will decide what to do with that main file, typically when using commands.


directory

Category-name : directory

What ?

directory is a resource type that represents a whole directory.



process

Category-name : process

@See : Since Squash TA 1.7.0, this resource moved to the Local Process Plugin.



properties

Category-name : properties

What ?

properties is a resource type that represents properties, in other words a set of pairs of <key - value >.



script.java

Category-name : script.java

What ?

This resource encapsulates a java code bundle, including resources and compiled java classes.



xml

Category-name : xml

What ?

xml is a resource type that represents a file or a folder, like file. The difference is that the content is trusted to be of XML nature.