Icon

This is the documentation of the latest development version of automaIT. The documentation of the latest stable release can be found at AUTOMAIT.

Skip to end of metadata
Go to start of metadata

Table of Contents

Further information

Icon

This page describes the structure and contents of an automaIT plug-in. For assistance on handling plug-ins in your development environment we offer an Eclipse plug-in. See page Development Environment for information on installing and using this helpful extension.

Plug-in structure

A plug-in is a zipped folder (usually having a .jar extension) with a plug-in descriptor in its root directory. The plugin-descriptor.xml defines the properties and the content of the plug-in. Usually a plug-in contains additional folders to group elements for better readability.

/
├─ components/
├─ plans/
├─ resources/
└─ plugin-descriptor.xml

There is a template plug-in project for Eclipse available. Besides the basic structure it also contains some files related to the Eclipse build process. Using the Eclipse plug-in you won't need this template as the Eclipse plug-in generates it for you.

The Plug-In Descriptor

The plugin-in descriptor defines the properties of a plugin as well as its contents.

plugin-descriptor.xml

Files that are included in the plug-in zip file and are not mentioned in the plug-in descriptor will not be recognized as part of the plug-in by the automaIT server.

Adding a Component

To add a component, the .xml file defining the component needs to be placed and registered inside the plug-in.

/
├─ components/
│	└─ Component.xml
├─ plans/
├─ resources/
└─ plugin-descriptor.xml

The following code can be used for a simple example component.

components/Component.xml  Expand source

 

The plug-in descriptor needs to know which .xml file to use and what type of element it describes. Therefore the plug-in descriptor gets extended by one line.

plugin-descriptor.xml

Adding a Plan

Adding a plan is almost the same procedure as Adding a Component. First the .xml file defining the plan needs to be placed into the plug-in.

/
├─ components/
│	└─ Component.xml
├─ plans/
│	└─ Plan.xml
├─ resources/
└─ plugin-descriptor.xml

The following example will install the above component.

plans/Plan.xml  Expand source

Then the Plan.xml file needs to be registered inside the plug-in descriptor.

plugin-descriptor.xml

Now the plug-in contains 

  1. a plug-in descriptor
  2. a component
  3. a plan
Any other files inside the plug-in will be ignored by the automaIT server.

Plug-In Versioning

Currently the plug-in descriptor defines the plug-in version 1.0. It is useful to reflect this version in the plug-in file name: info.novatec.automait.template_1.0.jar. The build script from the template project already uses the version to generate the file name.  A new plug-in version always depends on an older one.

The previousVersion attribute defines the version this plug-in depends on. Otherwise an error message like The plug-in cannot be imported because the plug-in info.novatec.automait.template#1.0 already exists and the new plug-in is not a patch plug-in. will be raised. Now it only can be imported into the automaIT server if version 1.0 of this plug-in is already installed. Also, it is not possible to skip a version. If a plug-in defines its version 1.3 and the previous version as 1.0 it can not be imported into a server with plug-in version 1.2.

Icon

Always keep ALL productive versions of a plug-in. If versions 1.0 to 1.3 are lost it is not possible to install a depending plug-in version 1.4.

  • No labels