自动化插件的 plugin.xml 文件

自动化插件使用 plugin.xml 文件进行定义。

此文件的结构由一个 header 元素和一个或多个 step-type 元素组成。header 元素标识插件。每个 step-type 元素都定义一个步骤。步骤可供用户在 IBM® UrbanCode Deploy 进程编辑器中使用,用来构造组件进程。

在文档类型声明后面,plugin 根元素标识 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 结构的信息,请参阅创建源插件


反馈