This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
commit 8b2ee19a9a0acfe5d97a7b3618776ecb5cc76717 Author: Andrea Cosentino <[email protected]> AuthorDate: Wed Nov 23 14:39:22 2022 +0100 Reintroduce the Camel-K-Knative-impl dependency and revisit modules Signed-off-by: Andrea Cosentino <[email protected]> --- camel-k-knative/impl/pom.xml | 110 +++++++++++++++++++++ ...tiveSinkBindingContextCustomizerConfigurer.java | 67 +++++++++++++ ....customizer.KnativeSinkBindingContextCustomizer | 2 + .../KnativeSinkBindingContextCustomizer.java | 107 ++++++++++++++++++++ .../knative/KnativeSourceLoaderInterceptor.java | 53 ++++++++++ camel-k-knative/pom.xml | 35 +++++++ itests/camel-k-itests-knative-consumer/pom.xml | 4 + .../camel/k/quarkus/it/KnativeConsumerTest.java | 5 +- .../pom.xml | 4 + .../pom.xml | 2 +- itests/camel-k-itests-knative-producer/pom.xml | 4 + .../camel/k/quarkus/it/KnativeProducerTest.java | 5 +- itests/camel-k-itests-knative-sinkbinding/pom.xml | 4 + .../camel-k-itests-knative-source-groovy/pom.xml | 4 + itests/camel-k-itests-knative-source-java/pom.xml | 4 + itests/camel-k-itests-knative-source-js/pom.xml | 4 + itests/camel-k-itests-knative-source-xml/pom.xml | 4 + itests/camel-k-itests-knative-source-yaml/pom.xml | 4 + itests/camel-k-itests-runtime-yaml/pom.xml | 17 +--- pom.xml | 8 ++ support/camel-k-runtime-bom/pom.xml | 5 + 21 files changed, 434 insertions(+), 18 deletions(-) diff --git a/camel-k-knative/impl/pom.xml b/camel-k-knative/impl/pom.xml new file mode 100644 index 00000000..a9428459 --- /dev/null +++ b/camel-k-knative/impl/pom.xml @@ -0,0 +1,110 @@ +<?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"> + <parent> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-parent</artifactId> + <version>1.16.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>camel-k-knative-impl</artifactId> + + <dependencies> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-core-support</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-knative</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-knative-http</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-apt</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-annotations</artifactId> + <optional>true</optional> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.jboss.jandex</groupId> + <artifactId>jandex-maven-plugin</artifactId> + <executions> + <execution> + <id>make-index</id> + <goals> + <goal>jandex</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.camel</groupId> + <artifactId>camel-package-maven-plugin</artifactId> + <version>${camel-version}</version> + <executions> + <execution> + <id>generate-configurer</id> + <phase>process-classes</phase> + <goals> + <goal>generate-configurer</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <phase>generate-sources</phase> + <goals> + <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> + </plugins> + </build> + +</project> diff --git a/camel-k-knative/impl/src/generated/java/org/apache/camel/k/knative/customizer/KnativeSinkBindingContextCustomizerConfigurer.java b/camel-k-knative/impl/src/generated/java/org/apache/camel/k/knative/customizer/KnativeSinkBindingContextCustomizerConfigurer.java new file mode 100644 index 00000000..791d8489 --- /dev/null +++ b/camel-k-knative/impl/src/generated/java/org/apache/camel/k/knative/customizer/KnativeSinkBindingContextCustomizerConfigurer.java @@ -0,0 +1,67 @@ +/* Generated by camel build tools - do NOT edit this file! */ +package org.apache.camel.k.knative.customizer; + +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.k.knative.customizer.KnativeSinkBindingContextCustomizer; + +/** + * Generated by camel build tools - do NOT edit this file! + */ +@SuppressWarnings("unchecked") +public class KnativeSinkBindingContextCustomizerConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { + + @Override + public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { + org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer target = (org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer) obj; + switch (ignoreCase ? name.toLowerCase() : name) { + case "apiversion": + case "ApiVersion": target.setApiVersion(property(camelContext, java.lang.String.class, value)); return true; + case "kind": + case "Kind": target.setKind(property(camelContext, java.lang.String.class, value)); return true; + case "name": + case "Name": target.setName(property(camelContext, java.lang.String.class, value)); return true; + case "type": + case "Type": target.setType(property(camelContext, org.apache.camel.component.knative.spi.Knative.Type.class, value)); return true; + default: return false; + } + } + + @Override + public Class<?> getOptionType(String name, boolean ignoreCase) { + switch (ignoreCase ? name.toLowerCase() : name) { + case "apiversion": + case "ApiVersion": return java.lang.String.class; + case "kind": + case "Kind": return java.lang.String.class; + case "name": + case "Name": return java.lang.String.class; + case "type": + case "Type": return org.apache.camel.component.knative.spi.Knative.Type.class; + default: return null; + } + } + + @Override + public Object getOptionValue(Object obj, String name, boolean ignoreCase) { + org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer target = (org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer) obj; + switch (ignoreCase ? name.toLowerCase() : name) { + case "apiversion": + case "ApiVersion": return target.getApiVersion(); + case "kind": + case "Kind": return target.getKind(); + case "name": + case "Name": return target.getName(); + case "type": + case "Type": return target.getType(); + default: return null; + } + } +} + diff --git a/camel-k-knative/impl/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer b/camel-k-knative/impl/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer new file mode 100644 index 00000000..b25ae52e --- /dev/null +++ b/camel-k-knative/impl/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer @@ -0,0 +1,2 @@ +# Generated by camel build tools - do NOT edit this file! +class=org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizerConfigurer diff --git a/camel-k-knative/impl/src/main/java/org/apache/camel/k/knative/customizer/KnativeSinkBindingContextCustomizer.java b/camel-k-knative/impl/src/main/java/org/apache/camel/k/knative/customizer/KnativeSinkBindingContextCustomizer.java new file mode 100644 index 00000000..e9d208a2 --- /dev/null +++ b/camel-k-knative/impl/src/main/java/org/apache/camel/k/knative/customizer/KnativeSinkBindingContextCustomizer.java @@ -0,0 +1,107 @@ +/* + * 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.k.knative.customizer; + +import java.io.IOException; +import java.io.Reader; +import java.io.StringReader; +import java.util.HashMap; + +import com.fasterxml.jackson.core.type.TypeReference; +import org.apache.camel.CamelContext; +import org.apache.camel.component.knative.spi.Knative; +import org.apache.camel.component.knative.spi.KnativeResource; +import org.apache.camel.k.ContextCustomizer; +import org.apache.camel.k.annotation.Customizer; +import org.apache.camel.spi.Configurer; +import org.apache.camel.util.ObjectHelper; + +@Configurer +@Customizer("sinkbinding") +public class KnativeSinkBindingContextCustomizer implements ContextCustomizer { + private String name; + private Knative.Type type; + private String kind; + private String apiVersion; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Knative.Type getType() { + return type; + } + + public void setType(Knative.Type type) { + this.type = type; + } + + public String getKind() { + return kind; + } + + public void setKind(String kind) { + this.kind = kind; + } + + public String getApiVersion() { + return apiVersion; + } + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + @Override + public void apply(CamelContext camelContext) { + final String kSinkUrl = camelContext.resolvePropertyPlaceholders("{{k.sink:}}"); + final String kCeOverride = camelContext.resolvePropertyPlaceholders("{{k.ce.overrides:}}"); + + if (ObjectHelper.isNotEmpty(kSinkUrl)) { + // create a synthetic service definition to target the K_SINK url + KnativeResource resource = new KnativeResource(); + resource.setEndpointKind(Knative.EndpointKind.sink); + resource.setType(type); + resource.setName(name); + resource.setUrl(kSinkUrl); + resource.setObjectApiVersion(apiVersion); + resource.setObjectKind(kind); + if (type == Knative.Type.event) { + resource.setObjectName(name); + } + + if (ObjectHelper.isNotEmpty(kCeOverride)) { + try (Reader reader = new StringReader(kCeOverride)) { + // assume K_CE_OVERRIDES is defined as simple key/val json + Knative.MAPPER.readValue( + reader, + new TypeReference<HashMap<String, String>>() { + } + ).forEach(resource::addCeOverride); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + camelContext.getRegistry().bind(name, resource); + } + } +} diff --git a/camel-k-knative/impl/src/main/java/org/apache/camel/k/loader/knative/KnativeSourceLoaderInterceptor.java b/camel-k-knative/impl/src/main/java/org/apache/camel/k/loader/knative/KnativeSourceLoaderInterceptor.java new file mode 100644 index 00000000..93cfdcfc --- /dev/null +++ b/camel-k-knative/impl/src/main/java/org/apache/camel/k/loader/knative/KnativeSourceLoaderInterceptor.java @@ -0,0 +1,53 @@ +/* + * 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.k.loader.knative; + +import java.util.List; + +import org.apache.camel.CamelContext; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.builder.RouteBuilderLifecycleStrategy; +import org.apache.camel.k.annotation.LoaderInterceptor; +import org.apache.camel.model.RouteDefinition; +import org.apache.camel.model.ToDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@LoaderInterceptor("knative-source") +public class KnativeSourceLoaderInterceptor implements RouteBuilderLifecycleStrategy { + private static final Logger LOGGER = LoggerFactory.getLogger(KnativeSourceLoaderInterceptor.class); + + @Override + public void afterConfigure(RouteBuilder builder) { + final CamelContext camelContext = builder.getContext(); + final List<RouteDefinition> definitions = builder.getRouteCollection().getRoutes(); + + if (definitions.size() == 1) { + final String sinkName = camelContext.resolvePropertyPlaceholders("{{knative.sink:sink}}"); + final String sinkUri = String.format("knative://endpoint/%s", sinkName); + final RouteDefinition definition = definitions.get(0); + + LOGGER.info("Add sink:{} to route:{}", sinkUri, definition.getId()); + + // assuming that route is linear like there's no content based routing + // or ant other EIP that would branch the flow + definition.getOutputs().add(new ToDefinition(sinkUri)); + } else { + LOGGER.warn("Cannot determine route to enrich. the knative enpoint need to explicitly be defined"); + } + } +} diff --git a/camel-k-knative/pom.xml b/camel-k-knative/pom.xml new file mode 100644 index 00000000..888c3668 --- /dev/null +++ b/camel-k-knative/pom.xml @@ -0,0 +1,35 @@ +<?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"> + <parent> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-runtime-project</artifactId> + <version>1.16.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + + <artifactId>camel-k-knative-parent</artifactId> + + <modules> + <module>impl</module> + </modules> + +</project> diff --git a/itests/camel-k-itests-knative-consumer/pom.xml b/itests/camel-k-itests-knative-consumer/pom.xml index 0aadc8ed..85ec4b20 100644 --- a/itests/camel-k-itests-knative-consumer/pom.xml +++ b/itests/camel-k-itests-knative-consumer/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> diff --git a/itests/camel-k-itests-knative-consumer/src/test/java/org/apache/camel/k/quarkus/it/KnativeConsumerTest.java b/itests/camel-k-itests-knative-consumer/src/test/java/org/apache/camel/k/quarkus/it/KnativeConsumerTest.java index 65372ceb..9f6becf7 100644 --- a/itests/camel-k-itests-knative-consumer/src/test/java/org/apache/camel/k/quarkus/it/KnativeConsumerTest.java +++ b/itests/camel-k-itests-knative-consumer/src/test/java/org/apache/camel/k/quarkus/it/KnativeConsumerTest.java @@ -22,6 +22,7 @@ import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; import io.restassured.path.json.JsonPath; import org.apache.camel.component.knative.http.KnativeHttpConsumerFactory; +import org.apache.camel.component.knative.http.KnativeHttpProducerFactory; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -43,6 +44,6 @@ public class KnativeConsumerTest { assertThat(p.getString("consumer-factory")) .isEqualTo(KnativeHttpConsumerFactory.class.getName()); assertThat(p.getString("producer-factory")) - .isNullOrEmpty(); + .isEqualTo(KnativeHttpProducerFactory.class.getName()); } -} \ No newline at end of file +} diff --git a/itests/camel-k-itests-knative-env-from-properties/pom.xml b/itests/camel-k-itests-knative-env-from-properties/pom.xml index 3caf0400..e80199ac 100644 --- a/itests/camel-k-itests-knative-env-from-properties/pom.xml +++ b/itests/camel-k-itests-knative-env-from-properties/pom.xml @@ -31,6 +31,10 @@ <dependency> <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/itests/camel-k-itests-knative-env-from-registry/pom.xml b/itests/camel-k-itests-knative-env-from-registry/pom.xml index 18daade0..e3fee0a7 100644 --- a/itests/camel-k-itests-knative-env-from-registry/pom.xml +++ b/itests/camel-k-itests-knative-env-from-registry/pom.xml @@ -101,7 +101,7 @@ </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-knative</artifactId> + <artifactId>camel-k-knative-impl</artifactId> <version>${project.version}</version> <type>pom</type> <scope>test</scope> diff --git a/itests/camel-k-itests-knative-producer/pom.xml b/itests/camel-k-itests-knative-producer/pom.xml index 0a949d38..40de47f3 100644 --- a/itests/camel-k-itests-knative-producer/pom.xml +++ b/itests/camel-k-itests-knative-producer/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> diff --git a/itests/camel-k-itests-knative-producer/src/test/java/org/apache/camel/k/quarkus/it/KnativeProducerTest.java b/itests/camel-k-itests-knative-producer/src/test/java/org/apache/camel/k/quarkus/it/KnativeProducerTest.java index eecc2303..8227e2e4 100644 --- a/itests/camel-k-itests-knative-producer/src/test/java/org/apache/camel/k/quarkus/it/KnativeProducerTest.java +++ b/itests/camel-k-itests-knative-producer/src/test/java/org/apache/camel/k/quarkus/it/KnativeProducerTest.java @@ -21,6 +21,7 @@ import javax.ws.rs.core.MediaType; import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; import io.restassured.path.json.JsonPath; +import org.apache.camel.component.knative.http.KnativeHttpConsumerFactory; import org.apache.camel.component.knative.http.KnativeHttpProducerFactory; import org.junit.jupiter.api.Test; @@ -41,8 +42,8 @@ public class KnativeProducerTest { .jsonPath(); assertThat(p.getString("consumer-factory")) - .isNullOrEmpty(); + .isEqualTo(KnativeHttpConsumerFactory.class.getName()); assertThat(p.getString("producer-factory")) .isEqualTo(KnativeHttpProducerFactory.class.getName()); } -} \ No newline at end of file +} diff --git a/itests/camel-k-itests-knative-sinkbinding/pom.xml b/itests/camel-k-itests-knative-sinkbinding/pom.xml index 8419d394..ae43a6f3 100644 --- a/itests/camel-k-itests-knative-sinkbinding/pom.xml +++ b/itests/camel-k-itests-knative-sinkbinding/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> diff --git a/itests/camel-k-itests-knative-source-groovy/pom.xml b/itests/camel-k-itests-knative-source-groovy/pom.xml index 13bb4c2e..58d78e39 100644 --- a/itests/camel-k-itests-knative-source-groovy/pom.xml +++ b/itests/camel-k-itests-knative-source-groovy/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> diff --git a/itests/camel-k-itests-knative-source-java/pom.xml b/itests/camel-k-itests-knative-source-java/pom.xml index aa9f39a6..d8b069db 100644 --- a/itests/camel-k-itests-knative-source-java/pom.xml +++ b/itests/camel-k-itests-knative-source-java/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> diff --git a/itests/camel-k-itests-knative-source-js/pom.xml b/itests/camel-k-itests-knative-source-js/pom.xml index 5a9fba53..2a184e04 100644 --- a/itests/camel-k-itests-knative-source-js/pom.xml +++ b/itests/camel-k-itests-knative-source-js/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> diff --git a/itests/camel-k-itests-knative-source-xml/pom.xml b/itests/camel-k-itests-knative-source-xml/pom.xml index ae63b556..4a70fa54 100644 --- a/itests/camel-k-itests-knative-source-xml/pom.xml +++ b/itests/camel-k-itests-knative-source-xml/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> diff --git a/itests/camel-k-itests-knative-source-yaml/pom.xml b/itests/camel-k-itests-knative-source-yaml/pom.xml index ae0f2e36..ca8a39f1 100644 --- a/itests/camel-k-itests-knative-source-yaml/pom.xml +++ b/itests/camel-k-itests-knative-source-yaml/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> diff --git a/itests/camel-k-itests-runtime-yaml/pom.xml b/itests/camel-k-itests-runtime-yaml/pom.xml index fa439bc2..fd83ddc1 100644 --- a/itests/camel-k-itests-runtime-yaml/pom.xml +++ b/itests/camel-k-itests-runtime-yaml/pom.xml @@ -32,6 +32,10 @@ <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-knative</artifactId> @@ -118,19 +122,6 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-knative-deployment</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> </dependencies> <build> diff --git a/pom.xml b/pom.xml index 10c97342..9ab2b43e 100644 --- a/pom.xml +++ b/pom.xml @@ -380,6 +380,7 @@ <module>camel-k-cron</module> <module>camel-k-cloudevents</module> + <module>camel-k-knative</module> <module>camel-k-master</module> <module>camel-k-webhook</module> <module>camel-k-runtime</module> @@ -468,6 +469,13 @@ <artifactId>camel-k-master-deployment</artifactId> <version>${project.version}</version> </dependency> + + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-cron-impl</artifactId> diff --git a/support/camel-k-runtime-bom/pom.xml b/support/camel-k-runtime-bom/pom.xml index 01a62a55..981c2210 100644 --- a/support/camel-k-runtime-bom/pom.xml +++ b/support/camel-k-runtime-bom/pom.xml @@ -170,6 +170,11 @@ <artifactId>camel-k-master</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel.k</groupId> + <artifactId>camel-k-knative-impl</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-kamelet-reify</artifactId>
