自動化プラグインの plugin.xml ファイル

自動化プラグインは、plugin.xml ファイルで定義されます。

このファイルは、1 つの header エレメントと、1 つ以上の step-type エレメントから構成されます。header エレメントはプラグインを識別します。step-type エレメントはそれぞれが 1 つのステップを定義します。ステップは IBM® UrbanCode Deploy プロセス・エディターでユーザーが利用でき、それらを使ってコンポーネント・プロセスを組み立てることができます。

文書タイプ宣言に続く plugin root エレメントは、XML スキーマ・タイプの PluginXMLSchema_v1.xsd を識別します。これはすべてのプラグインで使用されます。次のコードのサンプルは、自動化プラグインの基本的な plugin.xml ファイルの構造を示しています。

<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.urbancode.com/PluginXMLSchema_v1" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <header>
    <identifier id="plugin_id" version="version_number" name="Plug-in Name"/>
    <description/>
    <tag>Plugin type/Plugin subtype/Plugin name</tag>
  </header>
  <step-type name="Step_Name">
    <description/>
    <properties>
      <property name="porperty_name" required="true">
         <property-ui type="textBox" label="Driver Jar" 
             description="The full path to the jdbc driver jar to use." 
             default-value="${p:resource/sqlJdbc/jdbcJar}"/>
      </property>
    </properties>
    <post-processing>
      <![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put("Status", "Failure");
        }
        else {
            properties.put("Status", "Success");
        }
     ]]&gt;
    </post-processing>

    <command program="${path_to_tool">
      <arg value="parameters_passed_to_tool"/>
      <arg path="${p:jdbcJar}"/>
      <arg file="command_to_run"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>
</plugin>

ソース・プラグイン用の plugin.xml の構造については、ソース・プラグインの作成を参照してください。


フィードバック