Table of Contents
A plug-in is a zipped folder with a plug-in descriptor in its root. The plug-in-descriptor 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.
The Plug-In Descriptor
The plugin-in descriptor defines the properties of a plugin aswell as its contents.
Files that are included in the plug-in zip file and are not mentioned int 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 components needs to be placed inside the plugin.
/ ├─ components/ │ └─ TestComponent.xml ├─ plans/ ├─ resources/ └─ plugin-descriptor.xml
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.
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/ │ └─ TestComponent.xml ├─ plans/ │ └─ TestPlan.xml ├─ resources/ └─ plugin-descriptor.xml
Then the plan .xml file needs to be made visible inside the plug-in descriptor.
Now the plug-in contains
- a plug-in descriptor
- a component
- a plan
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 versions always depends on an older one.
previousVersion attribute defines the version this plug-in depends on. Now it only can be imported into the automaIT server if version 1.0 of this plugin 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.