10.5. Fuse Online エクステンション JAR ファイルのビルド

エクステンションの .jar ファイルをビルドするには、以下を行います。

  1. Project Explorer ビューで、プロジェクトを右クリックします。
  2. コンテキストメニューから Run AsMaven clean verify と選択します。
  3. Console ビューでは、ビルドの進捗を監視できます。
  4. ビルドが完了したら、Project Explorer ビューのターゲットフォルダーを更新します (プロジェクトを選択し、F5 を押します)。
  5. Project Explorer ビューでターゲットフォルダーを開き、生成された .jar ファイルを確認します。

    .jar ファイルの名前は Maven のデフォルト ${artifactId}-${version}.jar に従います。

    例: custom:step-camel-1.0.0.jar

    この .jar ファイルは、エクステンション、必要な依存関係、そのメタデータ (Extension Id、Name、Version、Tags、および Description) を定義します。以下に例を示します。

    {
        "schemaVersion" : "v1",
        "name" : "Example Fuse Online Extension",
        "description" : "Logs a message body with a prefix",
        "extensionId" : "fuse.online.extension.example",
        "version" : "1.0.0",
        "actions" : [ {
            "id" : "Log-body",
            "name" : "Log Body",
            "description" : "A simple xml Body Log with a prefix",
            "descriptor" : {
                "kind" : "ENDPOINT",
                "entrypoint" : "direct:log-xml",
                "resource" : "classpath:META-INF/syndesis/extensions/log-body-action.xml",
                "inputDataShape" : {
                    "kind" : "any"
                },
                "outputDataShape" : {
                    "kind" : "any"
                },
                "propertyDefinitionSteps" : [ {
                    "description" : "Define your Log message",
                    "name" : "Log Body",
                    "properties" : {
                        "prefix" : {
                            "componentProperty" : false,
                            "deprecated" : false,
                            "description" : "The Log body prefix message",
                            "displayName" : "Log Prefix",
                            "javaType" : "String",
                            "kind" : "parameter",
                            "required" : false,
                            "secret" : false,
                            "type" : "string"
                        }
                    }
                } ]
            },
            "tags" : [ "xml" ],
            "actionType" : "step"
        } ],
        "dependencies" : [ {
            "type" : "MAVEN",
            "id" : "io.syndesis.extension:extension-api:jar:1.3.0.fuse-000014"
        } ],
        "extensionType" : "Steps"
    }