You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/02/06 13:26:37 UTC

[camel-k-runtime] 01/01: Migrate knative component to camel 3.1

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel310
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git

commit d7f19fdeeb14bc2b30a4b8466bc8e866f3ac610b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 6 14:25:25 2020 +0100

    Migrate knative component to camel 3.1
---
 camel-knative/camel-knative-api/pom.xml            | 32 ++++++-------
 .../knative/spi/CloudEventTypeConverterLoader.java | 36 +++++++++++++++
 .../services/org/apache/camel/TypeConverterLoader  |  2 +
 camel-knative/camel-knative-http/pom.xml           | 21 ++++++---
 .../component/knative/http/KnativeHttpTest.java    |  2 +-
 camel-knative/camel-knative/pom.xml                | 33 +++++++-------
 .../knative/KnativeComponentConfigurer.java        | 38 ++++++++++++++++
 .../knative/KnativeEndpointConfigurer.java         | 51 +++++++++++++++++++++
 .../services/org/apache/camel/component/knative    |  2 +
 .../org/apache/camel/configurer/knative-component  |  2 +
 .../org/apache/camel/configurer/knative-endpoint   |  2 +
 .../apache/camel/component/knative/knative.json    | 52 ++++++++++++++++++++++
 .../camel/component/knative/KnativeComponent.java  |  3 ++
 .../knative/ce/AbstractCloudEventProcessor.java    |  3 +-
 .../component/knative/KnativeComponentTest.java    |  1 +
 15 files changed, 241 insertions(+), 39 deletions(-)

diff --git a/camel-knative/camel-knative-api/pom.xml b/camel-knative/camel-knative-api/pom.xml
index 79f2542..30e13ad 100644
--- a/camel-knative/camel-knative-api/pom.xml
+++ b/camel-knative/camel-knative-api/pom.xml
@@ -59,17 +59,6 @@
             <artifactId>jackson-datatype-jdk8</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>spi-annotations</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>apt</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
     </dependencies>
 
     <build>
@@ -85,21 +74,32 @@
                     <execution>
                         <id>generate</id>
                         <goals>
-                            <goal>prepare-components</goal>
+                            <goal>generate-component</goal>
                         </goals>
                         <phase>process-classes</phase>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.jboss.jandex</groupId>
-                <artifactId>jandex-maven-plugin</artifactId>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>make-index</id>
+                        <phase>generate-sources</phase>
                         <goals>
-                            <goal>jandex</goal>
+                            <goal>add-source</goal>
+                            <goal>add-resource</goal>
                         </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/generated/java</source>
+                            </sources>
+                            <resources>
+                                <resource>
+                                    <directory>src/generated/resources</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
                     </execution>
                 </executions>
             </plugin>
diff --git a/camel-knative/camel-knative-api/src/generated/java/org/apache/camel/component/knative/spi/CloudEventTypeConverterLoader.java b/camel-knative/camel-knative-api/src/generated/java/org/apache/camel/component/knative/spi/CloudEventTypeConverterLoader.java
new file mode 100644
index 0000000..7e5df28
--- /dev/null
+++ b/camel-knative/camel-knative-api/src/generated/java/org/apache/camel/component/knative/spi/CloudEventTypeConverterLoader.java
@@ -0,0 +1,36 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.knative.spi;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.TypeConversionException;
+import org.apache.camel.TypeConverterLoaderException;
+import org.apache.camel.spi.TypeConverterLoader;
+import org.apache.camel.spi.TypeConverterRegistry;
+import org.apache.camel.support.SimpleTypeConverter;
+import org.apache.camel.support.TypeConverterSupport;
+import org.apache.camel.util.DoubleMap;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public final class CloudEventTypeConverterLoader implements TypeConverterLoader {
+
+    public CloudEventTypeConverterLoader() {
+    }
+
+    @Override
+    public void load(TypeConverterRegistry registry) throws TypeConverterLoaderException {
+        registerConverters(registry);
+    }
+
+    private void registerConverters(TypeConverterRegistry registry) {
+        addTypeConverter(registry, org.apache.camel.component.knative.spi.CloudEvent.class, java.lang.String.class, false,
+            (type, exchange, value) -> org.apache.camel.component.knative.spi.CloudEventTypeConverter.fromSpecVersion((java.lang.String) value));
+    }
+
+    private static void addTypeConverter(TypeConverterRegistry registry, Class<?> toType, Class<?> fromType, boolean allowNull, SimpleTypeConverter.ConversionMethod method) { 
+        registry.addTypeConverter(toType, fromType, new SimpleTypeConverter(allowNull, method));
+    }
+
+}
diff --git a/camel-knative/camel-knative-api/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader b/camel-knative/camel-knative-api/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
new file mode 100644
index 0000000..3944526
--- /dev/null
+++ b/camel-knative/camel-knative-api/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+org.apache.camel.component.knative.spi.CloudEventTypeConverterLoader
diff --git a/camel-knative/camel-knative-http/pom.xml b/camel-knative/camel-knative-http/pom.xml
index 3a6fbff..c0518f7 100644
--- a/camel-knative/camel-knative-http/pom.xml
+++ b/camel-knative/camel-knative-http/pom.xml
@@ -175,21 +175,32 @@
                     <execution>
                         <id>generate</id>
                         <goals>
-                            <goal>prepare-components</goal>
+                            <goal>generate-component</goal>
                         </goals>
                         <phase>process-classes</phase>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.jboss.jandex</groupId>
-                <artifactId>jandex-maven-plugin</artifactId>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>make-index</id>
+                        <phase>generate-sources</phase>
                         <goals>
-                            <goal>jandex</goal>
+                            <goal>add-source</goal>
+                            <goal>add-resource</goal>
                         </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/generated/java</source>
+                            </sources>
+                            <resources>
+                                <resource>
+                                    <directory>src/generated/resources</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
                     </execution>
                 </executions>
             </plugin>
diff --git a/camel-knative/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpTest.java b/camel-knative/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpTest.java
index 2bc9f92..06bba76 100644
--- a/camel-knative/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpTest.java
+++ b/camel-knative/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpTest.java
@@ -43,7 +43,7 @@ import org.apache.camel.component.knative.spi.Knative;
 import org.apache.camel.component.knative.spi.KnativeEnvironment;
 import org.apache.camel.component.knative.spi.KnativeSupport;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.http.common.HttpOperationFailedException;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.test.AvailablePortFinder;
 import org.junit.jupiter.api.AfterEach;
diff --git a/camel-knative/camel-knative/pom.xml b/camel-knative/camel-knative/pom.xml
index 02c12b2..32dacbb 100644
--- a/camel-knative/camel-knative/pom.xml
+++ b/camel-knative/camel-knative/pom.xml
@@ -55,17 +55,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>spi-annotations</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>apt</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
         </dependency>
@@ -186,21 +175,33 @@
                     <execution>
                         <id>generate</id>
                         <goals>
-                            <goal>prepare-components</goal>
+                            <goal>generate-component</goal>
                         </goals>
                         <phase>process-classes</phase>
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
-                <groupId>org.jboss.jandex</groupId>
-                <artifactId>jandex-maven-plugin</artifactId>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>make-index</id>
+                        <phase>generate-sources</phase>
                         <goals>
-                            <goal>jandex</goal>
+                            <goal>add-source</goal>
+                            <goal>add-resource</goal>
                         </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/generated/java</source>
+                            </sources>
+                            <resources>
+                                <resource>
+                                    <directory>src/generated/resources</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
                     </execution>
                 </executions>
             </plugin>
diff --git a/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeComponentConfigurer.java b/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeComponentConfigurer.java
new file mode 100644
index 0000000..704428d
--- /dev/null
+++ b/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeComponentConfigurer.java
@@ -0,0 +1,38 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.knative;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class KnativeComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {
+
+    @Override
+    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+        KnativeComponent target = (KnativeComponent) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.knative.KnativeConfiguration.class, value)); return true;
+        case "environmentpath":
+        case "environmentPath": target.setEnvironmentPath(property(camelContext, java.lang.String.class, value)); return true;
+        case "environment": target.setEnvironment(property(camelContext, org.apache.camel.component.knative.spi.KnativeEnvironment.class, value)); return true;
+        case "cloudeventsspecversion":
+        case "cloudEventsSpecVersion": target.setCloudEventsSpecVersion(property(camelContext, java.lang.String.class, value)); return true;
+        case "transportoptions":
+        case "transportOptions": target.setTransportOptions(property(camelContext, java.util.Map.class, value)); return true;
+        case "transport": target.setTransport(property(camelContext, org.apache.camel.component.knative.spi.KnativeTransport.class, value)); return true;
+        case "basicpropertybinding":
+        case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
+        case "lazystartproducer":
+        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+        case "bridgeerrorhandler":
+        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
+        default: return false;
+        }
+    }
+
+}
+
diff --git a/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeEndpointConfigurer.java b/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeEndpointConfigurer.java
new file mode 100644
index 0000000..8f25832
--- /dev/null
+++ b/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeEndpointConfigurer.java
@@ -0,0 +1,51 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.knative;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class KnativeEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {
+
+    @Override
+    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+        KnativeEndpoint target = (KnativeEndpoint) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "ceoverride":
+        case "ceOverride": target.getConfiguration().setCeOverride(property(camelContext, java.util.Map.class, value)); return true;
+        case "cloudeventsspecversion":
+        case "cloudEventsSpecVersion": target.getConfiguration().setCloudEventsSpecVersion(property(camelContext, java.lang.String.class, value)); return true;
+        case "cloudeventstype":
+        case "cloudEventsType": target.getConfiguration().setCloudEventsType(property(camelContext, java.lang.String.class, value)); return true;
+        case "environment": target.getConfiguration().setEnvironment(property(camelContext, org.apache.camel.component.knative.spi.KnativeEnvironment.class, value)); return true;
+        case "filters": target.getConfiguration().setFilters(property(camelContext, java.util.Map.class, value)); return true;
+        case "servicename":
+        case "serviceName": target.getConfiguration().setServiceName(property(camelContext, java.lang.String.class, value)); return true;
+        case "transportoptions":
+        case "transportOptions": target.getConfiguration().setTransportOptions(property(camelContext, java.util.Map.class, value)); return true;
+        case "bridgeerrorhandler":
+        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
+        case "replywithcloudevent":
+        case "replyWithCloudEvent": target.getConfiguration().setReplyWithCloudEvent(property(camelContext, boolean.class, value)); return true;
+        case "exceptionhandler":
+        case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
+        case "exchangepattern":
+        case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
+        case "lazystartproducer":
+        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+        case "apiversion":
+        case "apiVersion": target.getConfiguration().setApiVersion(property(camelContext, java.lang.String.class, value)); return true;
+        case "basicpropertybinding":
+        case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
+        case "kind": target.getConfiguration().setKind(property(camelContext, java.lang.String.class, value)); return true;
+        case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
+        default: return false;
+        }
+    }
+
+}
+
diff --git a/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/component/knative b/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/component/knative
new file mode 100644
index 0000000..ef9a34e
--- /dev/null
+++ b/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/component/knative
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.knative.KnativeComponent
diff --git a/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/configurer/knative-component b/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/configurer/knative-component
new file mode 100644
index 0000000..d0fea09
--- /dev/null
+++ b/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/configurer/knative-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.knative.KnativeComponentConfigurer
diff --git a/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/configurer/knative-endpoint b/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/configurer/knative-endpoint
new file mode 100644
index 0000000..9aac63b
--- /dev/null
+++ b/camel-knative/camel-knative/src/generated/resources/META-INF/services/org/apache/camel/configurer/knative-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.knative.KnativeEndpointConfigurer
diff --git a/camel-knative/camel-knative/src/generated/resources/org/apache/camel/component/knative/knative.json b/camel-knative/camel-knative/src/generated/resources/org/apache/camel/component/knative/knative.json
new file mode 100644
index 0000000..e87488d
--- /dev/null
+++ b/camel-knative/camel-knative/src/generated/resources/org/apache/camel/component/knative/knative.json
@@ -0,0 +1,52 @@
+{
+  "component": {
+    "kind": "component",
+    "scheme": "knative",
+    "extendsScheme": "",
+    "syntax": "knative:type\/name",
+    "title": "Knative",
+    "description": "This component allows to interact with KNative events.",
+    "label": "cloud,eventing",
+    "deprecated": false,
+    "async": false,
+    "consumerOnly": false,
+    "producerOnly": false,
+    "lenientProperties": false,
+    "javaType": "org.apache.camel.component.knative.KnativeComponent",
+    "firstVersion": "3.0.0",
+    "groupId": "org.apache.camel.k",
+    "artifactId": "camel-knative",
+    "version": "1.1.0-SNAPSHOT"
+  },
+  "componentProperties": {
+    "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.component.knative.KnativeConfiguration", "deprecated": false, "secret": false, "description": "Set the configuration." },
+    "environmentPath": { "kind": "property", "displayName": "Environment Path", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The path ot the environment definition" },
+    "environment": { "kind": "property", "displayName": "Environment", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.component.knative.spi.KnativeEnvironment", "deprecated": false, "secret": false, "description": "The environment" },
+    "cloudEventsSpecVersion": { "kind": "property", "displayName": "Cloud Events Spec Version", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The version of the cloud events specification" },
+    "transportOptions": { "kind": "property", "displayName": "Transport Options", "group": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "deprecated": false, "secret": false, "description": "Transport options." },
+    "transport": { "kind": "property", "displayName": "Transport", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.knative.spi.KnativeTransport", "deprecated": false, "secret": false, "defaultValue": "http", "description": "The transport implementation." },
+    "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
+    "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
+    "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by [...]
+  },
+  "properties": {
+    "type": { "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.knative.spi.Knative.Type", "enum": [ "endpoint", "channel", "event" ], "deprecated": false, "secret": false, "description": "The Knative type" },
+    "name": { "kind": "path", "displayName": "Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The Knative name" },
+    "ceOverride": { "kind": "parameter", "displayName": "Ce Override", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "ce.override.", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "CloudEvent headers to override" },
+    "cloudEventsSpecVersion": { "kind": "parameter", "displayName": "Cloud Events Spec Version", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "0.1", "0.2", "0.3" ], "deprecated": false, "secret": false, "defaultValue": "0.3", "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "Set the version of the cloudevents spec." },
+    "cloudEventsType": { "kind": "parameter", "displayName": "Cloud Events Type", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "org.apache.camel.event", "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "Set the event-type information of the produced events." },
+    "environment": { "kind": "parameter", "displayName": "Environment", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.knative.spi.KnativeEnvironment", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "The environment" },
+    "filters": { "kind": "parameter", "displayName": "Filters", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "filter.", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "Set the filters." },
+    "serviceName": { "kind": "parameter", "displayName": "Service Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "The name of the service to lookup from the KnativeEnvironment." },
+    "transportOptions": { "kind": "parameter", "displayName": "Transport Options", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "transport.", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "Set the transport options." },
+    "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled b [...]
+    "replyWithCloudEvent": { "kind": "parameter", "displayName": "Reply With Cloud Event", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "Transforms the reply into a cloud event that will be processed by the caller. When listening to eve [...]
+    "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with [...]
+    "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
+    "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]
+    "apiVersion": { "kind": "parameter", "displayName": "Api Version", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "The version of the k8s resource referenced by the endpoint." },
+    "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
+    "kind": { "kind": "parameter", "displayName": "Kind", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "The type of the k8s resource referenced by the endpoint." },
+    "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }
+  }
+}
diff --git a/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java b/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java
index 7056f4c..1da8d03 100644
--- a/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java
+++ b/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java
@@ -107,6 +107,9 @@ public class KnativeComponent extends DefaultComponent {
         return configuration.getCloudEventsSpecVersion();
     }
 
+    /**
+     * The version of the cloud events specification
+     */
     public void setCloudEventsSpecVersion(String cloudEventSpecVersion) {
         configuration.setCloudEventsSpecVersion(cloudEventSpecVersion);
     }
diff --git a/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/ce/AbstractCloudEventProcessor.java b/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/ce/AbstractCloudEventProcessor.java
index 9a4e550..0bdde62 100644
--- a/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/ce/AbstractCloudEventProcessor.java
+++ b/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/ce/AbstractCloudEventProcessor.java
@@ -20,6 +20,7 @@ import java.io.InputStream;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.Date;
 import java.util.Map;
 import java.util.Objects;
 import java.util.function.Supplier;
@@ -95,7 +96,7 @@ abstract class AbstractCloudEventProcessor implements CloudEventProcessor {
                 return service.getMetadata().getOrDefault(Knative.KNATIVE_EVENT_TYPE, endpoint.getConfiguration().getCloudEventsType());
             });
             setCloudEventHeader(headers, CloudEvent.CAMEL_CLOUD_EVENT_TIME, () -> {
-                final ZonedDateTime created = exchange.getCreated().toInstant().atZone(ZoneId.systemDefault());
+                final ZonedDateTime created = new Date(exchange.getCreated()).toInstant().atZone(ZoneId.systemDefault());
                 final String eventTime = DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(created);
 
                 return eventTime;
diff --git a/camel-knative/camel-knative/src/test/java/org/apache/camel/component/knative/KnativeComponentTest.java b/camel-knative/camel-knative/src/test/java/org/apache/camel/component/knative/KnativeComponentTest.java
index 7a1870c..d9ebe5c 100644
--- a/camel-knative/camel-knative/src/test/java/org/apache/camel/component/knative/KnativeComponentTest.java
+++ b/camel-knative/camel-knative/src/test/java/org/apache/camel/component/knative/KnativeComponentTest.java
@@ -40,6 +40,7 @@ public class KnativeComponentTest {
     @BeforeEach
     public void before() {
         this.context = new DefaultCamelContext();
+        this.context.start();
     }
 
     @AfterEach