9.5. 构建 Fuse Online 扩展 JAR 文件
为扩展名构建 .jar
文件:
- 在 Project Explorer 视图中,右键点击该项目。
-
在上下文菜单中,选择 Run As
Maven clean verify。 - 在 Console 视图中,您可以监控构建的进度。
- 构建完成后,刷新 Project Explorer 视图中的目标文件夹(选择项目,然后按 F5)。
在 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" }