This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch once in repository https://gitbox.apache.org/repos/asf/camel.git
commit 69b45e6ad89c1b4cfe03aa901bbbbff2746b0be7 Author: Claus Ibsen <[email protected]> AuthorDate: Wed Dec 17 15:49:27 2025 +0100 CAMEL-22431: camel-once - A component for development to trigger only once --- bom/camel-bom/pom.xml | 5 + catalog/camel-allcomponents/pom.xml | 5 + .../org/apache/camel/catalog/components.properties | 1 + .../org/apache/camel/catalog/components/once.json | 37 +++ components/camel-once/pom.xml | 43 ++++ .../component/once/OnceComponentConfigurer.java | 57 +++++ .../component/once/OnceEndpointConfigurer.java | 66 ++++++ .../component/once/OnceEndpointUriFactory.java | 74 ++++++ .../org/apache/camel/component/once/once.json | 37 +++ .../services/org/apache/camel/component.properties | 7 + .../services/org/apache/camel/component/once | 2 + .../org/apache/camel/configurer/once-component | 2 + .../org/apache/camel/configurer/once-endpoint | 2 + .../org/apache/camel/urifactory/once-endpoint | 2 + .../camel-once/src/main/docs/once-component.adoc | 81 +++++++ .../apache/camel/component/once/OnceComponent.java | 34 +++ .../apache/camel/component/once/OnceConsumer.java | 37 +++ .../apache/camel/component/once/OnceEndpoint.java | 100 ++++++++ components/pom.xml | 1 + .../org/apache/camel/main/components.properties | 1 + .../modules/ROOT/examples/json/once.json | 1 + docs/components/modules/ROOT/nav.adoc | 1 + .../modules/ROOT/pages/once-component.adoc | 1 + .../builder/endpoint/EndpointBuilderFactory.java | 1 + .../camel/builder/endpoint/EndpointBuilders.java | 1 + .../builder/endpoint/StaticEndpointBuilders.java | 40 ++++ .../endpoint/dsl/OnceEndpointBuilderFactory.java | 261 +++++++++++++++++++++ .../camel-component-known-dependencies.properties | 1 + parent/pom.xml | 5 + 29 files changed, 906 insertions(+) diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml index 643a971175b6..e399a6774f85 100644 --- a/bom/camel-bom/pom.xml +++ b/bom/camel-bom/pom.xml @@ -1707,6 +1707,11 @@ <artifactId>camel-olingo4-api</artifactId> <version>4.17.0-SNAPSHOT</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-once</artifactId> + <version>4.17.0-SNAPSHOT</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-openai</artifactId> diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml index 6483ad8378df..fcbcf428b710 100644 --- a/catalog/camel-allcomponents/pom.xml +++ b/catalog/camel-allcomponents/pom.xml @@ -1511,6 +1511,11 @@ <artifactId>camel-olingo4-api</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-once</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-openai</artifactId> diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties index 2f97969e7b36..9cd604239c57 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties @@ -262,6 +262,7 @@ nitrite oaipmh olingo2 olingo4 +once opensearch openshift-build-configs openshift-builds diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/once.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/once.json new file mode 100644 index 000000000000..7ed47f77eb6c --- /dev/null +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/once.json @@ -0,0 +1,37 @@ +{ + "component": { + "kind": "component", + "name": "once", + "title": "Once", + "description": "Camel Once component", + "deprecated": false, + "firstVersion": "4.170.0", + "label": "core,scheduling", + "javaType": "org.apache.camel.component.once.OnceComponent", + "supportLevel": "Preview", + "groupId": "org.apache.camel", + "artifactId": "camel-once", + "version": "4.17.0-SNAPSHOT", + "scheme": "once", + "extendsScheme": "", + "syntax": "once:name", + "async": false, + "api": false, + "consumerOnly": true, + "producerOnly": false, + "lenientProperties": false, + "browsable": false, + "remote": false + }, + "componentProperties": { + "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...] + "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] + }, + "properties": { + "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The logical name" }, + "delay": { "index": 1, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "description": "The number of milliseconds to wait before triggering. The default value is 1000." }, + "bridgeErrorHandler": { "index": 2, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...] + "exceptionHandler": { "index": 3, "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, "autowired": 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 def [...] + "exchangePattern": { "index": 4, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." } + } +} diff --git a/components/camel-once/pom.xml b/components/camel-once/pom.xml new file mode 100644 index 000000000000..1e658ef0008c --- /dev/null +++ b/components/camel-once/pom.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.camel</groupId> + <artifactId>components</artifactId> + <version>4.17.0-SNAPSHOT</version> + </parent> + + <artifactId>camel-once</artifactId> + <packaging>jar</packaging> + + <name>Camel :: Once</name> + <description>Camel Once component</description> + + <dependencies> + + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-support</artifactId> + </dependency> + + </dependencies> +</project> diff --git a/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceComponentConfigurer.java b/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceComponentConfigurer.java new file mode 100644 index 000000000000..dd779699bc77 --- /dev/null +++ b/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceComponentConfigurer.java @@ -0,0 +1,57 @@ +/* Generated by camel build tools - do NOT edit this file! */ +package org.apache.camel.component.once; + +import javax.annotation.processing.Generated; +import java.util.Map; + +import org.apache.camel.CamelContext; +import org.apache.camel.spi.ExtendedPropertyConfigurerGetter; +import org.apache.camel.spi.PropertyConfigurerGetter; +import org.apache.camel.spi.ConfigurerStrategy; +import org.apache.camel.spi.GeneratedPropertyConfigurer; +import org.apache.camel.util.CaseInsensitiveMap; +import org.apache.camel.support.component.PropertyConfigurerSupport; + +/** + * Generated by camel build tools - do NOT edit this file! + */ +@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo") +@SuppressWarnings("unchecked") +public class OnceComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { + + @Override + public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { + OnceComponent target = (OnceComponent) obj; + switch (ignoreCase ? name.toLowerCase() : name) { + case "autowiredenabled": + case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true; + case "bridgeerrorhandler": + case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; + default: return false; + } + } + + @Override + public Class<?> getOptionType(String name, boolean ignoreCase) { + switch (ignoreCase ? name.toLowerCase() : name) { + case "autowiredenabled": + case "autowiredEnabled": return boolean.class; + case "bridgeerrorhandler": + case "bridgeErrorHandler": return boolean.class; + default: return null; + } + } + + @Override + public Object getOptionValue(Object obj, String name, boolean ignoreCase) { + OnceComponent target = (OnceComponent) obj; + switch (ignoreCase ? name.toLowerCase() : name) { + case "autowiredenabled": + case "autowiredEnabled": return target.isAutowiredEnabled(); + case "bridgeerrorhandler": + case "bridgeErrorHandler": return target.isBridgeErrorHandler(); + default: return null; + } + } +} + diff --git a/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceEndpointConfigurer.java b/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceEndpointConfigurer.java new file mode 100644 index 000000000000..6a77ea9ceac2 --- /dev/null +++ b/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceEndpointConfigurer.java @@ -0,0 +1,66 @@ +/* Generated by camel build tools - do NOT edit this file! */ +package org.apache.camel.component.once; + +import javax.annotation.processing.Generated; +import java.util.Map; + +import org.apache.camel.CamelContext; +import org.apache.camel.spi.ExtendedPropertyConfigurerGetter; +import org.apache.camel.spi.PropertyConfigurerGetter; +import org.apache.camel.spi.ConfigurerStrategy; +import org.apache.camel.spi.GeneratedPropertyConfigurer; +import org.apache.camel.util.CaseInsensitiveMap; +import org.apache.camel.support.component.PropertyConfigurerSupport; + +/** + * Generated by camel build tools - do NOT edit this file! + */ +@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo") +@SuppressWarnings("unchecked") +public class OnceEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { + + @Override + public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { + OnceEndpoint target = (OnceEndpoint) obj; + switch (ignoreCase ? name.toLowerCase() : name) { + case "bridgeerrorhandler": + case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; + case "delay": target.setDelay(property(camelContext, long.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; + default: return false; + } + } + + @Override + public Class<?> getOptionType(String name, boolean ignoreCase) { + switch (ignoreCase ? name.toLowerCase() : name) { + case "bridgeerrorhandler": + case "bridgeErrorHandler": return boolean.class; + case "delay": return long.class; + case "exceptionhandler": + case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class; + case "exchangepattern": + case "exchangePattern": return org.apache.camel.ExchangePattern.class; + default: return null; + } + } + + @Override + public Object getOptionValue(Object obj, String name, boolean ignoreCase) { + OnceEndpoint target = (OnceEndpoint) obj; + switch (ignoreCase ? name.toLowerCase() : name) { + case "bridgeerrorhandler": + case "bridgeErrorHandler": return target.isBridgeErrorHandler(); + case "delay": return target.getDelay(); + case "exceptionhandler": + case "exceptionHandler": return target.getExceptionHandler(); + case "exchangepattern": + case "exchangePattern": return target.getExchangePattern(); + default: return null; + } + } +} + diff --git a/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceEndpointUriFactory.java b/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceEndpointUriFactory.java new file mode 100644 index 000000000000..20250f4e0912 --- /dev/null +++ b/components/camel-once/src/generated/java/org/apache/camel/component/once/OnceEndpointUriFactory.java @@ -0,0 +1,74 @@ +/* Generated by camel build tools - do NOT edit this file! */ +package org.apache.camel.component.once; + +import javax.annotation.processing.Generated; +import java.net.URISyntaxException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.camel.spi.EndpointUriFactory; + +/** + * Generated by camel build tools - do NOT edit this file! + */ +@Generated("org.apache.camel.maven.packaging.GenerateEndpointUriFactoryMojo") +public class OnceEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory { + + private static final String BASE = ":name"; + + private static final Set<String> PROPERTY_NAMES; + private static final Set<String> SECRET_PROPERTY_NAMES; + private static final Map<String, String> MULTI_VALUE_PREFIXES; + static { + Set<String> props = new HashSet<>(5); + props.add("bridgeErrorHandler"); + props.add("delay"); + props.add("exceptionHandler"); + props.add("exchangePattern"); + props.add("name"); + PROPERTY_NAMES = Collections.unmodifiableSet(props); + SECRET_PROPERTY_NAMES = Collections.emptySet(); + MULTI_VALUE_PREFIXES = Collections.emptyMap(); + } + + @Override + public boolean isEnabled(String scheme) { + return "once".equals(scheme); + } + + @Override + public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException { + String syntax = scheme + BASE; + String uri = syntax; + + Map<String, Object> copy = new HashMap<>(properties); + + uri = buildPathParameter(syntax, uri, "name", null, true, copy); + uri = buildQueryParameters(uri, copy, encode); + return uri; + } + + @Override + public Set<String> propertyNames() { + return PROPERTY_NAMES; + } + + @Override + public Set<String> secretPropertyNames() { + return SECRET_PROPERTY_NAMES; + } + + @Override + public Map<String, String> multiValuePrefixes() { + return MULTI_VALUE_PREFIXES; + } + + @Override + public boolean isLenientProperties() { + return false; + } +} + diff --git a/components/camel-once/src/generated/resources/META-INF/org/apache/camel/component/once/once.json b/components/camel-once/src/generated/resources/META-INF/org/apache/camel/component/once/once.json new file mode 100644 index 000000000000..7ed47f77eb6c --- /dev/null +++ b/components/camel-once/src/generated/resources/META-INF/org/apache/camel/component/once/once.json @@ -0,0 +1,37 @@ +{ + "component": { + "kind": "component", + "name": "once", + "title": "Once", + "description": "Camel Once component", + "deprecated": false, + "firstVersion": "4.170.0", + "label": "core,scheduling", + "javaType": "org.apache.camel.component.once.OnceComponent", + "supportLevel": "Preview", + "groupId": "org.apache.camel", + "artifactId": "camel-once", + "version": "4.17.0-SNAPSHOT", + "scheme": "once", + "extendsScheme": "", + "syntax": "once:name", + "async": false, + "api": false, + "consumerOnly": true, + "producerOnly": false, + "lenientProperties": false, + "browsable": false, + "remote": false + }, + "componentProperties": { + "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...] + "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] + }, + "properties": { + "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The logical name" }, + "delay": { "index": 1, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "description": "The number of milliseconds to wait before triggering. The default value is 1000." }, + "bridgeErrorHandler": { "index": 2, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...] + "exceptionHandler": { "index": 3, "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, "autowired": 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 def [...] + "exchangePattern": { "index": 4, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." } + } +} diff --git a/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/component.properties new file mode 100644 index 000000000000..5ce57a5274c5 --- /dev/null +++ b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/component.properties @@ -0,0 +1,7 @@ +# Generated by camel build tools - do NOT edit this file! +components=once +groupId=org.apache.camel +artifactId=camel-once +version=4.17.0-SNAPSHOT +projectName=Camel :: Once +projectDescription=Camel Once component diff --git a/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/component/once b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/component/once new file mode 100644 index 000000000000..6f617d1f96cf --- /dev/null +++ b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/component/once @@ -0,0 +1,2 @@ +# Generated by camel build tools - do NOT edit this file! +class=org.apache.camel.component.once.OnceComponent diff --git a/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/configurer/once-component b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/configurer/once-component new file mode 100644 index 000000000000..76dec0b84023 --- /dev/null +++ b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/configurer/once-component @@ -0,0 +1,2 @@ +# Generated by camel build tools - do NOT edit this file! +class=org.apache.camel.component.once.OnceComponentConfigurer diff --git a/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/configurer/once-endpoint b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/configurer/once-endpoint new file mode 100644 index 000000000000..8089f8f8cde8 --- /dev/null +++ b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/configurer/once-endpoint @@ -0,0 +1,2 @@ +# Generated by camel build tools - do NOT edit this file! +class=org.apache.camel.component.once.OnceEndpointConfigurer diff --git a/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/urifactory/once-endpoint b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/urifactory/once-endpoint new file mode 100644 index 000000000000..ffe0e5da1c93 --- /dev/null +++ b/components/camel-once/src/generated/resources/META-INF/services/org/apache/camel/urifactory/once-endpoint @@ -0,0 +1,2 @@ +# Generated by camel build tools - do NOT edit this file! +class=org.apache.camel.component.once.OnceEndpointUriFactory diff --git a/components/camel-once/src/main/docs/once-component.adoc b/components/camel-once/src/main/docs/once-component.adoc new file mode 100644 index 000000000000..8345691e036b --- /dev/null +++ b/components/camel-once/src/main/docs/once-component.adoc @@ -0,0 +1,81 @@ += Once Component +:doctitle: Once +:shortname: once +:artifactid: camel-once +:description: Camel Once component +:since: 4.170 +:supportlevel: Preview +:tabs-sync-option: +:component-header: Only consumer is supported +:core: +//Manually maintained attributes +:camel-spring-boot-name: once + +*Since Camel {since}* + +*{component-header}* + +The Once component is used to generate a message only once. For example to trigger a message after Camel has been started, +or for development and testing purposes. + +This component is designed to be very basic and only a few options. + +You can find more features when using the xref:timer-component.adoc[Timer] component, +which also can be configured to only trigger once with `repeatCount=1`. + +== URI format + +---- +once:name[?options] +---- + +Where `name` is a logical name. + +// component options: START +include::partial$component-configure-options.adoc[] +include::partial$component-endpoint-options.adoc[] +include::partial$component-endpoint-headers.adoc[] +// component options: END + + +== Usage + +== Example + +To set up a route that generates an event every 60 seconds: + +[source,java] +---- +from("once:foo?body=file:data.json").to("bean:myBean?method=someMethodName"); +---- + +The above route will trigger once and load the `data.json` from file system and use as message body. +And then route to call the bean. + +And the route in XML DSL: + +[source,xml] +----- +<route> + <from uri="once:foo?body=file:data.json"/> + <to uri="bean:myBean?method=someMethodName"/> +</route> +----- + +=== Firing as soon as possible + +By default, the component is fired after 1 seconds when Camel has been fully started. +If you want to fire messages in a Camel route as soon as possible, you can use a negative delay: + +[source,xml] +---- +<route> + <from uri="once:foo?body=file.data.json&delay=-1"/> + <to uri="bean:myBean?method=someMethodName"/> +</route> +---- + +In this way, the timer will fire messages immediately. + + +include::spring-boot:partial$starter.adoc[] diff --git a/components/camel-once/src/main/java/org/apache/camel/component/once/OnceComponent.java b/components/camel-once/src/main/java/org/apache/camel/component/once/OnceComponent.java new file mode 100644 index 000000000000..5db8d6f49300 --- /dev/null +++ b/components/camel-once/src/main/java/org/apache/camel/component/once/OnceComponent.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.once; + +import java.util.Map; + +import org.apache.camel.Endpoint; +import org.apache.camel.spi.annotations.Component; +import org.apache.camel.support.DefaultComponent; + +@Component("once") +public class OnceComponent extends DefaultComponent { + + @Override + protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { + OnceEndpoint answer = new OnceEndpoint(uri, this, remaining); + setProperties(answer, parameters); + return answer; + } +} diff --git a/components/camel-once/src/main/java/org/apache/camel/component/once/OnceConsumer.java b/components/camel-once/src/main/java/org/apache/camel/component/once/OnceConsumer.java new file mode 100644 index 000000000000..8d95317cb67c --- /dev/null +++ b/components/camel-once/src/main/java/org/apache/camel/component/once/OnceConsumer.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.once; + +import org.apache.camel.CamelContext; +import org.apache.camel.Processor; +import org.apache.camel.StartupListener; +import org.apache.camel.Suspendable; +import org.apache.camel.api.management.ManagedResource; +import org.apache.camel.support.DefaultConsumer; + +@ManagedResource(description = "Managed OnceConsumer") +public class OnceConsumer extends DefaultConsumer implements StartupListener, Suspendable { + + public OnceConsumer(OnceEndpoint endpoint, Processor processor) { + super(endpoint, processor); + } + + @Override + public void onCamelContextStarted(CamelContext context, boolean alreadyStarted) throws Exception { + + } +} diff --git a/components/camel-once/src/main/java/org/apache/camel/component/once/OnceEndpoint.java b/components/camel-once/src/main/java/org/apache/camel/component/once/OnceEndpoint.java new file mode 100644 index 000000000000..2519157472fd --- /dev/null +++ b/components/camel-once/src/main/java/org/apache/camel/component/once/OnceEndpoint.java @@ -0,0 +1,100 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.once; + +import org.apache.camel.Category; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.api.management.ManagedAttribute; +import org.apache.camel.api.management.ManagedResource; +import org.apache.camel.spi.Metadata; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; +import org.apache.camel.spi.UriPath; +import org.apache.camel.support.DefaultEndpoint; + +@ManagedResource(description = "Managed OnceEndpoint") +@UriEndpoint(firstVersion = "4.170.0", scheme = "once", title = "Once", syntax = "once:name", consumerOnly = true, + remote = false, category = { Category.CORE, Category.SCHEDULING }) +public class OnceEndpoint extends DefaultEndpoint { + + @UriPath + @Metadata(required = true) + private String name; + @UriParam(defaultValue = "1000") + private long delay = 1000; + + public OnceEndpoint() { + } + + public OnceEndpoint(String endpointUri, Component component, String name) { + super(endpointUri, component); + this.name = name; + } + + @Override + public boolean isRemote() { + return false; + } + + @Override + public OnceComponent getComponent() { + return (OnceComponent) super.getComponent(); + } + + @Override + public Producer createProducer() throws Exception { + throw new RuntimeCamelException("Cannot produce to a OnceEndpoint: " + getEndpointUri()); + } + + @Override + public Consumer createConsumer(Processor processor) throws Exception { + Consumer answer = new OnceConsumer(this, processor); + configureConsumer(answer); + return answer; + } + + @ManagedAttribute(description = "Name") + public String getName() { + return name; + } + + /** + * The logical name + */ + public void setName(String name) { + this.name = name; + } + + @ManagedAttribute(description = "Delay") + public long getDelay() { + return delay; + } + + /** + * The number of milliseconds to wait before triggering. + * <p/> + * The default value is 1000. + */ + @ManagedAttribute(description = "Delay") + public void setDelay(long delay) { + this.delay = delay; + } +} diff --git a/components/pom.xml b/components/pom.xml index 8e01ba1b9f14..d94d234c7ebc 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -242,6 +242,7 @@ <module>camel-ognl</module> <module>camel-olingo2</module> <module>camel-olingo4</module> + <module>camel-once</module> <module>camel-openstack</module> <module>camel-opentelemetry</module> <module>camel-opentelemetry2</module> diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties index 2f97969e7b36..9cd604239c57 100644 --- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties +++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties @@ -262,6 +262,7 @@ nitrite oaipmh olingo2 olingo4 +once opensearch openshift-build-configs openshift-builds diff --git a/docs/components/modules/ROOT/examples/json/once.json b/docs/components/modules/ROOT/examples/json/once.json new file mode 120000 index 000000000000..a562c68acbc7 --- /dev/null +++ b/docs/components/modules/ROOT/examples/json/once.json @@ -0,0 +1 @@ +../../../../../../components/camel-once/src/generated/resources/META-INF/org/apache/camel/component/once/once.json \ No newline at end of file diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc index f5a7e7914716..9823bd3db03c 100644 --- a/docs/components/modules/ROOT/nav.adoc +++ b/docs/components/modules/ROOT/nav.adoc @@ -280,6 +280,7 @@ ** xref:oaipmh-component.adoc[OAI-PMH] ** xref:olingo2-component.adoc[Olingo2] ** xref:olingo4-component.adoc[Olingo4] +** xref:once-component.adoc[Once] ** xref:milo-browse-component.adoc[OPC UA Browser] ** xref:milo-client-component.adoc[OPC UA Client] ** xref:milo-server-component.adoc[OPC UA Server] diff --git a/docs/components/modules/ROOT/pages/once-component.adoc b/docs/components/modules/ROOT/pages/once-component.adoc new file mode 120000 index 000000000000..63187382584d --- /dev/null +++ b/docs/components/modules/ROOT/pages/once-component.adoc @@ -0,0 +1 @@ +../../../../../components/camel-once/src/main/docs/once-component.adoc \ No newline at end of file diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java index 33ad891feced..4b8424a248b3 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java @@ -273,6 +273,7 @@ public interface EndpointBuilderFactory org.apache.camel.builder.endpoint.dsl.OBSEndpointBuilderFactory.OBSBuilders, org.apache.camel.builder.endpoint.dsl.Olingo2EndpointBuilderFactory.Olingo2Builders, org.apache.camel.builder.endpoint.dsl.Olingo4EndpointBuilderFactory.Olingo4Builders, + org.apache.camel.builder.endpoint.dsl.OnceEndpointBuilderFactory.OnceBuilders, org.apache.camel.builder.endpoint.dsl.OpenTelemetryEndpointBuilderFactory.OpenTelemetryBuilders, org.apache.camel.builder.endpoint.dsl.OpensearchEndpointBuilderFactory.OpensearchBuilders, org.apache.camel.builder.endpoint.dsl.OpenshiftBuildConfigsEndpointBuilderFactory.OpenshiftBuildConfigsBuilders, diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java index b85c75691bbf..eb38d68fd0ef 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java @@ -270,6 +270,7 @@ public interface EndpointBuilders org.apache.camel.builder.endpoint.dsl.OBSEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.Olingo2EndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.Olingo4EndpointBuilderFactory, + org.apache.camel.builder.endpoint.dsl.OnceEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.OpenTelemetryEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.OpensearchEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.OpenshiftBuildConfigsEndpointBuilderFactory, diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index b800e5ffc61e..ed34bb0027e0 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -11840,6 +11840,46 @@ public class StaticEndpointBuilders { public static Olingo4EndpointBuilderFactory.Olingo4EndpointBuilder olingo4(String componentName, String path) { return Olingo4EndpointBuilderFactory.endpointBuilder(componentName, path); } + /** + * Once (camel-once) + * Camel Once component + * + * Category: core,scheduling + * Since: 4.170 + * Maven coordinates: org.apache.camel:camel-once + * + * Syntax: <code>once:name</code> + * + * Path parameter: name (required) + * The logical name + * + * @param path name + * @return the dsl builder + */ + public static OnceEndpointBuilderFactory.OnceEndpointBuilder once(String path) { + return once("once", path); + } + /** + * Once (camel-once) + * Camel Once component + * + * Category: core,scheduling + * Since: 4.170 + * Maven coordinates: org.apache.camel:camel-once + * + * Syntax: <code>once:name</code> + * + * Path parameter: name (required) + * The logical name + * + * @param componentName to use a custom component name for the endpoint + * instead of the default name + * @param path name + * @return the dsl builder + */ + public static OnceEndpointBuilderFactory.OnceEndpointBuilder once(String componentName, String path) { + return OnceEndpointBuilderFactory.endpointBuilder(componentName, path); + } /** * OpenSearch (camel-opensearch) * Send requests to OpenSearch via Java Client API. diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OnceEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OnceEndpointBuilderFactory.java new file mode 100644 index 000000000000..ced7b44531ac --- /dev/null +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OnceEndpointBuilderFactory.java @@ -0,0 +1,261 @@ +/* Generated by camel build tools - do NOT edit this file! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.builder.endpoint.dsl; + +import java.util.*; +import java.util.concurrent.*; +import java.util.function.*; +import java.util.stream.*; +import javax.annotation.processing.Generated; +import org.apache.camel.builder.EndpointConsumerBuilder; +import org.apache.camel.builder.EndpointProducerBuilder; +import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; + +/** + * Camel Once component + * + * Generated by camel build tools - do NOT edit this file! + */ +@Generated("org.apache.camel.maven.packaging.EndpointDslMojo") +public interface OnceEndpointBuilderFactory { + + /** + * Builder for endpoint for the Once component. + */ + public interface OnceEndpointBuilder + extends + EndpointConsumerBuilder { + default AdvancedOnceEndpointBuilder advanced() { + return (AdvancedOnceEndpointBuilder) this; + } + + /** + * The number of milliseconds to wait before triggering. The default + * value is 1000. + * + * The option is a: <code>long</code> type. + * + * Default: 1000 + * Group: consumer + * + * @param delay the value to set + * @return the dsl builder + */ + default OnceEndpointBuilder delay(long delay) { + doSetProperty("delay", delay); + return this; + } + /** + * The number of milliseconds to wait before triggering. The default + * value is 1000. + * + * The option will be converted to a <code>long</code> type. + * + * Default: 1000 + * Group: consumer + * + * @param delay the value to set + * @return the dsl builder + */ + default OnceEndpointBuilder delay(String delay) { + doSetProperty("delay", delay); + return this; + } + } + + /** + * Advanced builder for endpoint for the Once component. + */ + public interface AdvancedOnceEndpointBuilder + extends + EndpointConsumerBuilder { + default OnceEndpointBuilder basic() { + return (OnceEndpointBuilder) this; + } + + /** + * Allows for bridging the consumer to the Camel routing Error Handler, + * which mean any exceptions (if possible) occurred while the Camel + * consumer is trying to pickup incoming messages, or the likes, will + * now be processed as a message and handled by the routing Error + * Handler. Important: This is only possible if the 3rd party component + * allows Camel to be alerted if an exception was thrown. Some + * components handle this internally only, and therefore + * bridgeErrorHandler is not possible. In other situations we may + * improve the Camel component to hook into the 3rd party component and + * make this possible for future releases. By default the consumer will + * use the org.apache.camel.spi.ExceptionHandler to deal with + * exceptions, that will be logged at WARN or ERROR level and ignored. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: consumer (advanced) + * + * @param bridgeErrorHandler the value to set + * @return the dsl builder + */ + default AdvancedOnceEndpointBuilder bridgeErrorHandler(boolean bridgeErrorHandler) { + doSetProperty("bridgeErrorHandler", bridgeErrorHandler); + return this; + } + /** + * Allows for bridging the consumer to the Camel routing Error Handler, + * which mean any exceptions (if possible) occurred while the Camel + * consumer is trying to pickup incoming messages, or the likes, will + * now be processed as a message and handled by the routing Error + * Handler. Important: This is only possible if the 3rd party component + * allows Camel to be alerted if an exception was thrown. Some + * components handle this internally only, and therefore + * bridgeErrorHandler is not possible. In other situations we may + * improve the Camel component to hook into the 3rd party component and + * make this possible for future releases. By default the consumer will + * use the org.apache.camel.spi.ExceptionHandler to deal with + * exceptions, that will be logged at WARN or ERROR level and ignored. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: consumer (advanced) + * + * @param bridgeErrorHandler the value to set + * @return the dsl builder + */ + default AdvancedOnceEndpointBuilder bridgeErrorHandler(String bridgeErrorHandler) { + doSetProperty("bridgeErrorHandler", bridgeErrorHandler); + return this; + } + /** + * 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 exceptions, that will be + * logged at WARN or ERROR level and ignored. + * + * The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> + * type. + * + * Group: consumer (advanced) + * + * @param exceptionHandler the value to set + * @return the dsl builder + */ + default AdvancedOnceEndpointBuilder exceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler) { + doSetProperty("exceptionHandler", exceptionHandler); + return this; + } + /** + * 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 exceptions, that will be + * logged at WARN or ERROR level and ignored. + * + * The option will be converted to a + * <code>org.apache.camel.spi.ExceptionHandler</code> type. + * + * Group: consumer (advanced) + * + * @param exceptionHandler the value to set + * @return the dsl builder + */ + default AdvancedOnceEndpointBuilder exceptionHandler(String exceptionHandler) { + doSetProperty("exceptionHandler", exceptionHandler); + return this; + } + /** + * Sets the exchange pattern when the consumer creates an exchange. + * + * The option is a: <code>org.apache.camel.ExchangePattern</code> type. + * + * Group: consumer (advanced) + * + * @param exchangePattern the value to set + * @return the dsl builder + */ + default AdvancedOnceEndpointBuilder exchangePattern(org.apache.camel.ExchangePattern exchangePattern) { + doSetProperty("exchangePattern", exchangePattern); + return this; + } + /** + * Sets the exchange pattern when the consumer creates an exchange. + * + * The option will be converted to a + * <code>org.apache.camel.ExchangePattern</code> type. + * + * Group: consumer (advanced) + * + * @param exchangePattern the value to set + * @return the dsl builder + */ + default AdvancedOnceEndpointBuilder exchangePattern(String exchangePattern) { + doSetProperty("exchangePattern", exchangePattern); + return this; + } + } + + public interface OnceBuilders { + /** + * Once (camel-once) + * Camel Once component + * + * Category: core,scheduling + * Since: 4.170 + * Maven coordinates: org.apache.camel:camel-once + * + * Syntax: <code>once:name</code> + * + * Path parameter: name (required) + * The logical name + * + * @param path name + * @return the dsl builder + */ + default OnceEndpointBuilder once(String path) { + return OnceEndpointBuilderFactory.endpointBuilder("once", path); + } + /** + * Once (camel-once) + * Camel Once component + * + * Category: core,scheduling + * Since: 4.170 + * Maven coordinates: org.apache.camel:camel-once + * + * Syntax: <code>once:name</code> + * + * Path parameter: name (required) + * The logical name + * + * @param componentName to use a custom component name for the endpoint + * instead of the default name + * @param path name + * @return the dsl builder + */ + default OnceEndpointBuilder once(String componentName, String path) { + return OnceEndpointBuilderFactory.endpointBuilder(componentName, path); + } + + } + static OnceEndpointBuilder endpointBuilder(String componentName, String path) { + class OnceEndpointBuilderImpl extends AbstractEndpointBuilder implements OnceEndpointBuilder, AdvancedOnceEndpointBuilder { + public OnceEndpointBuilderImpl(String path) { + super(componentName, path); + } + } + return new OnceEndpointBuilderImpl(path); + } +} \ No newline at end of file diff --git a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties index ce1eedaf7eda..c5a8617d06e2 100644 --- a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties +++ b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties @@ -273,6 +273,7 @@ org.apache.camel.component.netty.http.NettyHttpComponent=camel:netty-http org.apache.camel.component.nitrite.NitriteComponent=camel:nitrite org.apache.camel.component.olingo2.Olingo2Component=camel:olingo2 org.apache.camel.component.olingo4.Olingo4Component=camel:olingo4 +org.apache.camel.component.once.OnceComponent=camel:once org.apache.camel.component.opensearch.OpensearchComponent=camel:opensearch org.apache.camel.component.openshift.build_configs.OpenshiftBuildConfigsComponent=camel:kubernetes org.apache.camel.component.openshift.builds.OpenshiftBuildsComponent=camel:kubernetes diff --git a/parent/pom.xml b/parent/pom.xml index 92a7a2826852..d2016beb7791 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -2184,6 +2184,11 @@ <artifactId>camel-olingo4-api</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-once</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-openai</artifactId>
