Plugin.xml

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 NewFile from the context menu.

Creating a New File

Figure 1.14. Creating a New File


After that, you will be prompted to type the name of the file. Type plugin.xml. Click the Finish button. You will see the plugin.xml item in the Navigator pane and the file opens in the editor.

Plugin.xml File Has Been Created

Figure 1.15. Plugin.xml File Has Been Created


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:

If the project has been compliled, you may delete the src subfolder.