When your component is finished, in order to make it known to the ComponentFactory
(a Java class that creates components based on component type and XML parameter definition),
you have to create plugin.xml file.
Right-click the org.company.components
project name and select → from the context menu.
After that, you will be prompted to type the name of the file. Type
plugin.xml. Click the button. You will
see the plugin.xml item in the
Navigator pane and the file opens in the
editor.
The file must have the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="org.company.components"
version="1.0.0"
provider-name="Company Ltd.">
<runtime>
<library path="bin/"/>
<!--
<library path="org.company.components.jar"/>
<library path="lib/saxon8.jar"/>
-->
</runtime>
<requires engine-version="3.0.1">
<!--
<import plugin-id="org.jetel.connection"/>
<import plugin-id="org.jetel.lookup"/>
-->
</requires>
<extension point-id="component">
<parameter
id="className"
value="org.company.components.NewComponent"/>
<parameter id="type" value="NEW_COMPONENT"/>
</extension>
</plugin>Let's take a detailed look at the file content:
The plugin id corresponds with the project name,
thus org.company.components. The
plugin version and provider-name (your company name) attributes
should be set according to your real conditions.
If your component uses any other classes or .jar files, they must be located
within the component project folder and listed in the runtime tag (together with
the component class file). Here, the NewComponent.class is located in the
bin subfolder (the forward slash is of importance; it must be there).
Your class requires CloverETL Engine, the version
of which must be given in the requires engine-version tag. Here, we use the
latest CloverETL Engine version. If your component requires any
other plugin, it should be mentioned here, in the import plugin-id tag.
Remember that every component defined in the plug-in must refer to its own extension
point-id tag. Be sure that the className is given properly, i.e.,
<package name>.<class name>, and that the type corresponds to
COMPONENT_TYPE variable defined in your component Java class file
(NEW_COMPONENT in our example).
If the project has been compliled, you may delete the
src subfolder.