This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 5cf846413eb4df1a2465dcdd04b21b287960500a Author: nicolaferraro <[email protected]> AuthorDate: Mon Nov 9 17:27:59 2020 +0100 Fix #1562: switch to refactored runtime without Quarkus support --- build/maven/pom-runtime.xml | 166 +++------------------ ...rkus.yaml => camel-catalog-1.6.0-SNAPSHOT.yaml} | 152 +++++++++---------- pkg/trait/cron_test.go | 4 +- pkg/trait/dependencies_test.go | 18 +-- pkg/util/defaults/defaults.go | 2 +- pkg/util/test/catalog_test.go | 2 +- script/Makefile | 4 +- 7 files changed, 107 insertions(+), 241 deletions(-) diff --git a/build/maven/pom-runtime.xml b/build/maven/pom-runtime.xml index 7c9a5e8..c1b4488 100644 --- a/build/maven/pom-runtime.xml +++ b/build/maven/pom-runtime.xml @@ -40,48 +40,32 @@ <!-- camel-k --> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-knative-api</artifactId> - <version>${runtime.version}</version> - </dependency> - <dependency> - <groupId>org.apache.camel.k</groupId> - <artifactId>camel-knative</artifactId> - <version>${runtime.version}</version> - </dependency> - <dependency> - <groupId>org.apache.camel.k</groupId> - <artifactId>camel-knative-http</artifactId> + <artifactId>camel-k-runtime</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-core</artifactId> + <artifactId>camel-k-runtime-deployment</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-main</artifactId> + <artifactId>camel-knative-api</artifactId> <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.cedarsoftware</groupId> - <artifactId>java-util</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-health</artifactId> + <artifactId>camel-knative</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-http</artifactId> + <artifactId>camel-knative-http</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-webhook</artifactId> + <artifactId>camel-k-runtime-core</artifactId> <version>${runtime.version}</version> </dependency> <dependency> @@ -91,183 +75,77 @@ </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-master</artifactId> + <artifactId>camel-k-master</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-cron</artifactId> + <artifactId>camel-k-cron</artifactId> <version>${runtime.version}</version> </dependency> - <!-- runtime - quarkus --> - <dependency> - <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-quarkus</artifactId> - <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-quarkus-loader-yaml</artifactId> - <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-quarkus-loader-xml</artifactId> - <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> + <!-- loaders --> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-quarkus-loader-js</artifactId> + <artifactId>camel-k-loader-kotlin</artifactId> <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-quarkus-loader-java</artifactId> + <artifactId>camel-k-loader-kotlin-deployment</artifactId> <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-quarkus-loader-groovy</artifactId> + <artifactId>camel-k-loader-groovy</artifactId> <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-quarkus-loader-kotlin</artifactId> + <artifactId>camel-k-loader-groovy-deployment</artifactId> <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-quarkus-core</artifactId> + <artifactId>camel-k-loader-yaml</artifactId> <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-quarkus-knative</artifactId> + <artifactId>camel-k-loader-yaml-deployment</artifactId> <version>${runtime.version}</version> - <exclusions> - <exclusion> - <groupId>com.oracle.substratevm</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>org.graalvm.nativeimage</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> </dependency> - - <!-- loaders --> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-loader-kotlin</artifactId> + <artifactId>camel-k-loader-js</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-loader-groovy</artifactId> + <artifactId>camel-k-loader-js-deployment</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-loader-yaml</artifactId> + <artifactId>camel-k-loader-xml</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-loader-js</artifactId> + <artifactId>camel-k-loader-xml-deployment</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-loader-xml</artifactId> + <artifactId>camel-k-loader-java</artifactId> <version>${runtime.version}</version> </dependency> <dependency> <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-loader-java</artifactId> + <artifactId>camel-k-loader-java-deployment</artifactId> <version>${runtime.version}</version> </dependency> + </dependencies> <repositories> diff --git a/deploy/camel-catalog-1.5.0-quarkus.yaml b/deploy/camel-catalog-1.6.0-SNAPSHOT.yaml similarity index 97% rename from deploy/camel-catalog-1.5.0-quarkus.yaml rename to deploy/camel-catalog-1.6.0-SNAPSHOT.yaml index f4963bc..6740a0d 100644 --- a/deploy/camel-catalog-1.5.0-quarkus.yaml +++ b/deploy/camel-catalog-1.6.0-SNAPSHOT.yaml @@ -18,30 +18,29 @@ apiVersion: camel.apache.org/v1 kind: CamelCatalog metadata: - name: camel-catalog-1.5.0-quarkus + name: camel-catalog-1.6.0-snapshot labels: app: camel-k - camel.apache.org/catalog.version: 3.5.0 - camel.apache.org/catalog.loader.version: 3.5.0 - camel.apache.org/runtime.version: 1.5.0 - camel.apache.org/runtime.provider: quarkus + camel.apache.org/catalog.version: 3.6.0 + camel.apache.org/catalog.loader.version: 3.6.0 + camel.apache.org/runtime.version: 1.6.0-SNAPSHOT spec: runtime: - version: 1.5.0 + version: 1.6.0-SNAPSHOT provider: quarkus applicationClass: io.quarkus.runner.GeneratedMain metadata: - camel.version: 3.5.0 - quarkus.version: 1.8.0.Final - camel-quarkus.version: 1.1.0 + camel.version: 3.6.0 + quarkus.version: 1.9.0.Final + camel-quarkus.version: 1.3.0 dependencies: - groupId: org.apache.camel.k - artifactId: camel-k-runtime-quarkus + artifactId: camel-k-runtime capabilities: cron: dependencies: - groupId: org.apache.camel.k - artifactId: camel-k-quarkus-cron + artifactId: camel-k-cron health: dependencies: - groupId: org.apache.camel.quarkus @@ -67,7 +66,7 @@ spec: master: dependencies: - groupId: org.apache.camel.k - artifactId: camel-k-quarkus-master + artifactId: camel-k-master artifacts: camel-quarkus-aws2-ses: groupId: org.apache.camel.quarkus @@ -1464,6 +1463,15 @@ spec: passive: false javaTypes: - org.apache.camel.component.asterisk.AsteriskComponent + camel-quarkus-jcache: + groupId: org.apache.camel.quarkus + artifactId: camel-quarkus-jcache + schemes: + - id: jcache + http: false + passive: false + javaTypes: + - org.apache.camel.component.jcache.JCacheComponent camel-quarkus-file: groupId: org.apache.camel.quarkus artifactId: camel-quarkus-file @@ -1783,15 +1791,6 @@ spec: passive: false javaTypes: - org.apache.camel.component.saga.SagaComponent - camel-quarkus-hipchat: - groupId: org.apache.camel.quarkus - artifactId: camel-quarkus-hipchat - schemes: - - id: hipchat - http: false - passive: false - javaTypes: - - org.apache.camel.component.hipchat.HipchatComponent camel-quarkus-ldap: groupId: org.apache.camel.quarkus artifactId: camel-quarkus-ldap @@ -2452,6 +2451,15 @@ spec: passive: false javaTypes: - org.apache.camel.component.nagios.NagiosComponent + camel-quarkus-hbase: + groupId: org.apache.camel.quarkus + artifactId: camel-quarkus-hbase + schemes: + - id: hbase + http: false + passive: false + javaTypes: + - org.apache.camel.component.hbase.HBaseComponent camel-quarkus-language: groupId: org.apache.camel.quarkus artifactId: camel-quarkus-language @@ -2736,6 +2744,15 @@ spec: passive: false javaTypes: - org.apache.camel.component.ehcache.EhcacheComponent + camel-quarkus-spark: + groupId: org.apache.camel.quarkus + artifactId: camel-quarkus-spark + schemes: + - id: spark + http: false + passive: false + javaTypes: + - org.apache.camel.component.spark.SparkComponent camel-quarkus-fhir: groupId: org.apache.camel.quarkus artifactId: camel-quarkus-fhir @@ -2804,116 +2821,87 @@ spec: javaTypes: - org.apache.camel.dataformat.xstream.JsonDataFormat - org.apache.camel.dataformat.xstream.XStreamDataFormat - camel-k-loader-yaml: - groupId: org.apache.camel.k - artifactId: camel-k-loader-yaml - camel-k-loader-groovy: - groupId: org.apache.camel.k - artifactId: camel-k-loader-groovy - camel-k-loader-kotlin: - groupId: org.apache.camel.k - artifactId: camel-k-loader-kotlin - camel-k-loader-js: - groupId: org.apache.camel.k - artifactId: camel-k-loader-js - camel-k-loader-xml: + camel-k-cron: groupId: org.apache.camel.k - artifactId: camel-k-loader-xml - camel-k-loader-java: - groupId: org.apache.camel.k - artifactId: camel-k-loader-java - camel-k-runtime-main: - groupId: org.apache.camel.k - artifactId: camel-k-runtime-main - camel-k-runtime-health: - groupId: org.apache.camel.k - artifactId: camel-k-runtime-health - camel-k-runtime-http: - groupId: org.apache.camel.k - artifactId: camel-k-runtime-http - camel-k-runtime-webhook: - groupId: org.apache.camel.k - artifactId: camel-k-runtime-webhook - camel-k-runtime-cron: - groupId: org.apache.camel.k - artifactId: camel-k-runtime-cron - camel-k-runtime-knative: + artifactId: camel-k-cron + schemes: + - id: cron + http: false + passive: false + camel-k-kamelet: groupId: org.apache.camel.k - artifactId: camel-k-runtime-knative - dependencies: - - groupId: org.apache.camel.k - artifactId: camel-k-quarkus-knative - - groupId: org.apache.camel.k - artifactId: camel-k-quarkus-loader-yaml - camel-knative: + artifactId: camel-k-kamelet + schemes: + - id: kamelet + http: false + passive: true + camel-k-knative: groupId: org.apache.camel.k - artifactId: camel-knative + artifactId: camel-k-knative schemes: - id: knative http: true passive: false - dependencies: - - groupId: org.apache.camel.k - artifactId: camel-k-quarkus-knative - camel-kamelet: + camel-k-master: groupId: org.apache.camel.k - artifactId: camel-kamelet + artifactId: camel-k-master schemes: - - id: kamelet + - id: master http: false + passive: false + camel-k-webhook: + groupId: org.apache.camel.k + artifactId: camel-k-webhook + schemes: + - id: webhook + http: true passive: true - dependencies: - - groupId: org.apache.camel.k - artifactId: camel-k-quarkus-kamelet - camel-wrap: + camel-k-wrap: groupId: org.apache.camel.k - artifactId: camel-wrap + artifactId: camel-k-wrap schemes: - id: wrap http: false passive: false - dependencies: - - groupId: org.apache.camel.k - artifactId: camel-k-quarkus-wrap loaders: yaml: groupId: org.apache.camel.k - artifactId: camel-k-quarkus-loader-yaml + artifactId: camel-k-loader-yaml languages: - yaml metadata: native: "true" groovy: groupId: org.apache.camel.k - artifactId: camel-k-quarkus-loader-groovy + artifactId: camel-k-loader-groovy languages: - groovy metadata: native: "false" kts: groupId: org.apache.camel.k - artifactId: camel-k-quarkus-loader-kotlin + artifactId: camel-k-loader-kotlin languages: - kts metadata: native: "false" js: groupId: org.apache.camel.k - artifactId: camel-k-quarkus-loader-js + artifactId: camel-k-loader-js languages: - js metadata: native: "true" xml: groupId: org.apache.camel.k - artifactId: camel-k-quarkus-loader-xml + artifactId: camel-k-loader-xml languages: - xml metadata: native: "true" java: groupId: org.apache.camel.k - artifactId: camel-k-quarkus-loader-java + artifactId: camel-k-loader-java languages: - java metadata: diff --git a/pkg/trait/cron_test.go b/pkg/trait/cron_test.go index c228dbe..9848843 100644 --- a/pkg/trait/cron_test.go +++ b/pkg/trait/cron_test.go @@ -287,7 +287,7 @@ func TestCronDeps(t *testing.T) { assert.NotNil(t, ct) assert.Nil(t, ct.Fallback) assert.True(t, util.StringSliceExists(environment.Integration.Status.Capabilities, v1.CapabilityCron)) - assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-quarkus-cron") + assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-cron") } func TestCronDepsFallback(t *testing.T) { @@ -362,7 +362,7 @@ func TestCronDepsFallback(t *testing.T) { assert.NotNil(t, ct.Fallback) assert.True(t, util.StringSliceExists(environment.Integration.Status.Capabilities, v1.CapabilityCron)) assert.Contains(t, environment.Integration.Status.Dependencies, "camel-quarkus:quartz") - assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-quarkus-cron") + assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-cron") } func TestCronWithMain(t *testing.T) { diff --git a/pkg/trait/dependencies_test.go b/pkg/trait/dependencies_test.go index 183d01e..75cd784 100644 --- a/pkg/trait/dependencies_test.go +++ b/pkg/trait/dependencies_test.go @@ -85,8 +85,8 @@ func TestIntegrationDefaultDeps(t *testing.T) { []string{ "camel-quarkus:direct", "camel-quarkus:log", - "mvn:org.apache.camel.k/camel-k-quarkus-loader-java", - "mvn:org.apache.camel.k/camel-k-runtime-quarkus"}, + "mvn:org.apache.camel.k/camel-k-loader-java", + "mvn:org.apache.camel.k/camel-k-runtime"}, e.Integration.Status.Dependencies, ) } @@ -133,8 +133,8 @@ func TestIntegrationCustomDeps(t *testing.T) { "camel-quarkus:log", "camel:netty-http", "org.foo:bar", - "mvn:org.apache.camel.k/camel-k-quarkus-loader-java", - "mvn:org.apache.camel.k/camel-k-runtime-quarkus"}, + "mvn:org.apache.camel.k/camel-k-loader-java", + "mvn:org.apache.camel.k/camel-k-runtime"}, e.Integration.Status.Dependencies, ) } @@ -190,9 +190,9 @@ func TestIntegrationAutoGeneratedDeps(t *testing.T) { "camel-quarkus:direct", "camel-quarkus:log", "mvn:org.apache.camel.quarkus/camel-quarkus-rest", - "mvn:org.apache.camel.k/camel-k-quarkus-loader-java", - "mvn:org.apache.camel.k/camel-k-quarkus-loader-xml", - "mvn:org.apache.camel.k/camel-k-runtime-quarkus", + "mvn:org.apache.camel.k/camel-k-loader-java", + "mvn:org.apache.camel.k/camel-k-loader-xml", + "mvn:org.apache.camel.k/camel-k-runtime", "mvn:org.apache.camel.quarkus/camel-quarkus-platform-http"}, e.Integration.Status.Dependencies, ) @@ -238,8 +238,8 @@ func TestIntegrationCustomLoader(t *testing.T) { []string{ "camel-quarkus:direct", "camel-quarkus:log", - "mvn:org.apache.camel.k/camel-k-quarkus-loader-yaml", - "mvn:org.apache.camel.k/camel-k-runtime-quarkus"}, + "mvn:org.apache.camel.k/camel-k-loader-yaml", + "mvn:org.apache.camel.k/camel-k-runtime"}, e.Integration.Status.Dependencies, ) } diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go index ede7d07..4cf0e91 100644 --- a/pkg/util/defaults/defaults.go +++ b/pkg/util/defaults/defaults.go @@ -26,7 +26,7 @@ const ( Version = "1.3.0-SNAPSHOT" // DefaultRuntimeVersion -- - DefaultRuntimeVersion = "1.5.0" + DefaultRuntimeVersion = "1.6.0-SNAPSHOT" // BuildahVersion -- BuildahVersion = "1.14.0" diff --git a/pkg/util/test/catalog_test.go b/pkg/util/test/catalog_test.go index 9e483f4..3be3774 100644 --- a/pkg/util/test/catalog_test.go +++ b/pkg/util/test/catalog_test.go @@ -35,7 +35,7 @@ func TestRuntimeContainsEmbeddedArtifacts(t *testing.T) { artifact := catalog.GetArtifactByScheme("knative") assert.Equal(t, 1, len(artifact.Schemes)) assert.Equal(t, "org.apache.camel.k", artifact.GroupID) - assert.Equal(t, "camel-knative", artifact.ArtifactID) + assert.Equal(t, "camel-k-knative", artifact.ArtifactID) scheme, found := catalog.GetScheme("knative") assert.True(t, found) diff --git a/script/Makefile b/script/Makefile index 59d6740..b9939ae 100644 --- a/script/Makefile +++ b/script/Makefile @@ -17,7 +17,7 @@ VERSIONFILE := pkg/util/defaults/defaults.go VERSION := 1.3.0-SNAPSHOT OPERATOR_VERSION := $(subst -SNAPSHOT,,$(VERSION)) LAST_RELEASED_VERSION := 1.2.0 -RUNTIME_VERSION := 1.5.0 +RUNTIME_VERSION := 1.6.0-SNAPSHOT BUILDAH_VERSION := 1.14.0 KANIKO_VERSION := 0.17.1 BASE_IMAGE := adoptopenjdk/openjdk11:slim @@ -161,7 +161,7 @@ build-kamel: go build $(GOFLAGS) -o kamel ./cmd/kamel/*.go build-resources: bundle-kamelets - ./script/build_catalog.sh $(RUNTIME_VERSION) -Dcatalog.file=camel-catalog-$(RUNTIME_VERSION)-quarkus.yaml -Dcatalog.runtime=quarkus -Dstaging.repo="$(STAGING_RUNTIME_REPO)" + ./script/build_catalog.sh $(RUNTIME_VERSION) -Dcatalog.file=camel-catalog-$(RUNTIME_VERSION).yaml -Dcatalog.runtime=quarkus -Dstaging.repo="$(STAGING_RUNTIME_REPO)" ./script/embed_resources.sh deploy bundle-kamelets:
