搜索

9.5. 构建 Fuse Online 扩展 JAR 文件

download PDF

为扩展名构建 .jar 文件:

  1. Project Explorer 视图中,右键点击该项目。
  2. 在上下文菜单中,选择 Run As Maven clean verify
  3. Console 视图中,您可以监控构建的进度。
  4. 构建完成后,刷新 Project Explorer 视图中的目标文件夹(选择项目,然后按 F5)。
  5. Project Explorer 视图中,打开目标文件夹以查看生成的 .jar 文件:

    .jar 文件的名称遵循 Maven defaults: ${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"
    }
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.