This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/master by this push:
new 5fe44a3 Remove obsolete runtime dependency type
5fe44a3 is described below
commit 5fe44a354363878664edda50106418012cc520f8
Author: lburgazzoli <[email protected]>
AuthorDate: Tue Jul 16 16:27:32 2019 +0200
Remove obsolete runtime dependency type
---
build/maven/pom-runtime.xml | 60 +++++-
deploy/camel-catalog-3.0.0-M4.yaml | 56 +++++-
deploy/platform-integration-kit-groovy.yaml | 5 +-
...ive.yaml => platform-integration-kit-java.yaml} | 8 +-
...ative.yaml => platform-integration-kit-js.yaml} | 8 +-
deploy/platform-integration-kit-knative.yaml | 6 +-
deploy/platform-integration-kit-kotlin.yaml | 5 +-
...jvm.yaml => platform-integration-kit-main.yaml} | 5 +-
...tive.yaml => platform-integration-kit-xml.yaml} | 8 +-
...ive.yaml => platform-integration-kit-yaml.yaml} | 8 +-
deploy/resources.go | 211 +++++++++++++++++++--
e2e/build_test.go | 20 +-
e2e/install_test.go | 9 +-
.../v1alpha1/integration_types_support_test.go | 16 +-
pkg/builder/builder_steps.go | 48 +----
pkg/builder/builder_steps_test.go | 26 +--
pkg/builder/builder_utils_test.go | 2 +-
pkg/cmd/completion_bash.go | 12 --
pkg/cmd/kit_create.go | 9 -
pkg/cmd/run.go | 6 -
pkg/trait/camel.go | 2 +
pkg/trait/dependencies.go | 18 +-
pkg/trait/dependencies_test.go | 12 +-
pkg/trait/deployment.go | 3 -
pkg/trait/environment.go | 4 +
pkg/trait/knative_service.go | 3 -
pkg/trait/probes.go | 2 +-
pkg/trait/probes_test.go | 2 +-
pkg/util/maven/maven.go | 1 -
pkg/util/maven/maven_project.go | 2 +-
pkg/util/maven/maven_project_test.go | 2 +-
script/Makefile | 2 +-
32 files changed, 400 insertions(+), 181 deletions(-)
diff --git a/build/maven/pom-runtime.xml b/build/maven/pom-runtime.xml
index cffcdaa..2768b43 100644
--- a/build/maven/pom-runtime.xml
+++ b/build/maven/pom-runtime.xml
@@ -47,42 +47,86 @@
</dependency>
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-groovy</artifactId>
+ <artifactId>camel-k-runtime-main</artifactId>
<version>${runtime.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-health</artifactId>
+ <artifactId>camel-k-runtime-servlet</artifactId>
<version>${runtime.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-jvm</artifactId>
+ <artifactId>camel-k-runtime-knative</artifactId>
<version>${runtime.version}</version>
</dependency>
+
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-kotlin</artifactId>
+ <artifactId>camel-knative</artifactId>
<version>${runtime.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-servlet</artifactId>
+ <artifactId>camel-knative-http</artifactId>
<version>${runtime.version}</version>
</dependency>
+
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-yaml</artifactId>
+ <artifactId>camel-k-loader-java</artifactId>
<version>${runtime.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-knative</artifactId>
+ <artifactId>camel-k-loader-js</artifactId>
<version>${runtime.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-knative-http</artifactId>
+ <artifactId>camel-k-loader-xml</artifactId>
+ <version>${runtime.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-loader-kotlin</artifactId>
+ <version>${runtime.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-loader-groovy</artifactId>
+ <version>${runtime.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-loader-yaml</artifactId>
+ <version>${runtime.version}</version>
+ </dependency>
+
+ <!-- legacy -->
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-runtime-groovy</artifactId>
+ <version>${runtime.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-runtime-health</artifactId>
+ <version>${runtime.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-runtime-jvm</artifactId>
+ <version>${runtime.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-runtime-kotlin</artifactId>
+ <version>${runtime.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-runtime-yaml</artifactId>
<version>${runtime.version}</version>
</dependency>
</dependencies>
diff --git a/deploy/camel-catalog-3.0.0-M4.yaml
b/deploy/camel-catalog-3.0.0-M4.yaml
index 43dcf38..2d9ca14 100644
--- a/deploy/camel-catalog-3.0.0-M4.yaml
+++ b/deploy/camel-catalog-3.0.0-M4.yaml
@@ -1164,11 +1164,36 @@ spec:
- id: jt400
http: false
passive: false
+ camel-k-loader-groovy:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-groovy
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-groovy
+ camel-k-loader-java:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-java
+ version: 1.0.0
+ camel-k-loader-js:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-js
+ version: 1.0.0
+ camel-k-loader-kotlin:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-kotlin
+ version: 1.0.0
+ camel-k-loader-xml:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-xml
+ version: 1.0.0
camel-k-runtime-groovy:
groupId: org.apache.camel.k
artifactId: camel-k-runtime-groovy
version: 1.0.0
dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-groovy
- groupId: org.apache.camel
artifactId: camel-groovy
camel-k-runtime-health:
@@ -1184,6 +1209,14 @@ spec:
artifactId: camel-k-runtime-jvm
version: 1.0.0
dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-main
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-js
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-xml
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-java
- groupId: org.apache.camel
artifactId: camel-core-engine
- groupId: org.apache.camel
@@ -1195,7 +1228,7 @@ spec:
artifactId: camel-k-runtime-knative
dependencies:
- groupId: org.apache.camel.k
- artifactId: camel-k-runtime-yaml
+ artifactId: camel-k-loader-yaml
- groupId: org.apache.camel.k
artifactId: camel-knative
- groupId: org.apache.camel.k
@@ -1206,12 +1239,33 @@ spec:
groupId: org.apache.camel.k
artifactId: camel-k-runtime-kotlin
version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-kotlin
+ camel-k-runtime-main:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-main
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-core-engine
+ - groupId: org.apache.camel
+ artifactId: camel-main
+ - groupId: org.apache.camel
+ artifactId: camel-properties
camel-k-runtime-servlet:
groupId: org.apache.camel.k
artifactId: camel-k-runtime-servlet
dependencies:
- groupId: org.apache.camel
artifactId: camel-servlet
+ camel-k-runtime-yaml:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-yaml
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-yaml
camel-kafka:
groupId: org.apache.camel
artifactId: camel-kafka
diff --git a/deploy/platform-integration-kit-groovy.yaml
b/deploy/platform-integration-kit-groovy.yaml
index fcc9cde..534520d 100644
--- a/deploy/platform-integration-kit-groovy.yaml
+++ b/deploy/platform-integration-kit-groovy.yaml
@@ -26,6 +26,5 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:groovy
- - camel:core
\ No newline at end of file
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-groovy
\ No newline at end of file
diff --git a/deploy/platform-integration-kit-knative.yaml
b/deploy/platform-integration-kit-java.yaml
similarity index 91%
copy from deploy/platform-integration-kit-knative.yaml
copy to deploy/platform-integration-kit-java.yaml
index f9ad77a..8c16690 100644
--- a/deploy/platform-integration-kit-knative.yaml
+++ b/deploy/platform-integration-kit-java.yaml
@@ -18,7 +18,7 @@
apiVersion: camel.apache.org/v1alpha1
kind: IntegrationKit
metadata:
- name: knative
+ name: java
labels:
app: "camel-k"
camel.apache.org/kit.created.by.kind: Operator
@@ -26,7 +26,5 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:yaml
- - camel:core
- - camel-k:knative
\ No newline at end of file
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-java
\ No newline at end of file
diff --git a/deploy/platform-integration-kit-knative.yaml
b/deploy/platform-integration-kit-js.yaml
similarity index 91%
copy from deploy/platform-integration-kit-knative.yaml
copy to deploy/platform-integration-kit-js.yaml
index f9ad77a..73f6035 100644
--- a/deploy/platform-integration-kit-knative.yaml
+++ b/deploy/platform-integration-kit-js.yaml
@@ -18,7 +18,7 @@
apiVersion: camel.apache.org/v1alpha1
kind: IntegrationKit
metadata:
- name: knative
+ name: js
labels:
app: "camel-k"
camel.apache.org/kit.created.by.kind: Operator
@@ -26,7 +26,5 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:yaml
- - camel:core
- - camel-k:knative
\ No newline at end of file
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-js
\ No newline at end of file
diff --git a/deploy/platform-integration-kit-knative.yaml
b/deploy/platform-integration-kit-knative.yaml
index f9ad77a..f24afe6 100644
--- a/deploy/platform-integration-kit-knative.yaml
+++ b/deploy/platform-integration-kit-knative.yaml
@@ -26,7 +26,5 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:yaml
- - camel:core
- - camel-k:knative
\ No newline at end of file
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-runtime-knative
\ No newline at end of file
diff --git a/deploy/platform-integration-kit-kotlin.yaml
b/deploy/platform-integration-kit-kotlin.yaml
index caea0b5..6941b10 100644
--- a/deploy/platform-integration-kit-kotlin.yaml
+++ b/deploy/platform-integration-kit-kotlin.yaml
@@ -26,6 +26,5 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:kotlin
- - camel:core
\ No newline at end of file
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-kotlin
\ No newline at end of file
diff --git a/deploy/platform-integration-kit-jvm.yaml
b/deploy/platform-integration-kit-main.yaml
similarity index 95%
rename from deploy/platform-integration-kit-jvm.yaml
rename to deploy/platform-integration-kit-main.yaml
index 96a59aa..e8e9a46 100644
--- a/deploy/platform-integration-kit-jvm.yaml
+++ b/deploy/platform-integration-kit-main.yaml
@@ -18,7 +18,7 @@
apiVersion: camel.apache.org/v1alpha1
kind: IntegrationKit
metadata:
- name: jvm
+ name: main
labels:
app: "camel-k"
camel.apache.org/kit.created.by.kind: Operator
@@ -26,5 +26,4 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - camel:core
\ No newline at end of file
+ - mvn:org.apache.camel.k/camel-k-runtime-main
\ No newline at end of file
diff --git a/deploy/platform-integration-kit-knative.yaml
b/deploy/platform-integration-kit-xml.yaml
similarity index 91%
copy from deploy/platform-integration-kit-knative.yaml
copy to deploy/platform-integration-kit-xml.yaml
index f9ad77a..e9690d4 100644
--- a/deploy/platform-integration-kit-knative.yaml
+++ b/deploy/platform-integration-kit-xml.yaml
@@ -18,7 +18,7 @@
apiVersion: camel.apache.org/v1alpha1
kind: IntegrationKit
metadata:
- name: knative
+ name: xml
labels:
app: "camel-k"
camel.apache.org/kit.created.by.kind: Operator
@@ -26,7 +26,5 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:yaml
- - camel:core
- - camel-k:knative
\ No newline at end of file
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-js
\ No newline at end of file
diff --git a/deploy/platform-integration-kit-knative.yaml
b/deploy/platform-integration-kit-yaml.yaml
similarity index 91%
copy from deploy/platform-integration-kit-knative.yaml
copy to deploy/platform-integration-kit-yaml.yaml
index f9ad77a..ba4a411 100644
--- a/deploy/platform-integration-kit-knative.yaml
+++ b/deploy/platform-integration-kit-yaml.yaml
@@ -18,7 +18,7 @@
apiVersion: camel.apache.org/v1alpha1
kind: IntegrationKit
metadata:
- name: knative
+ name: yaml
labels:
app: "camel-k"
camel.apache.org/kit.created.by.kind: Operator
@@ -26,7 +26,5 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:yaml
- - camel:core
- - camel-k:knative
\ No newline at end of file
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-yaml
\ No newline at end of file
diff --git a/deploy/resources.go b/deploy/resources.go
index 235b85e..ad80ee6 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -1339,11 +1339,36 @@ spec:
- id: jt400
http: false
passive: false
+ camel-k-loader-groovy:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-groovy
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-groovy
+ camel-k-loader-java:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-java
+ version: 1.0.0
+ camel-k-loader-js:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-js
+ version: 1.0.0
+ camel-k-loader-kotlin:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-kotlin
+ version: 1.0.0
+ camel-k-loader-xml:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-xml
+ version: 1.0.0
camel-k-runtime-groovy:
groupId: org.apache.camel.k
artifactId: camel-k-runtime-groovy
version: 1.0.0
dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-groovy
- groupId: org.apache.camel
artifactId: camel-groovy
camel-k-runtime-health:
@@ -1359,6 +1384,14 @@ spec:
artifactId: camel-k-runtime-jvm
version: 1.0.0
dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-main
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-js
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-xml
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-java
- groupId: org.apache.camel
artifactId: camel-core-engine
- groupId: org.apache.camel
@@ -1370,7 +1403,7 @@ spec:
artifactId: camel-k-runtime-knative
dependencies:
- groupId: org.apache.camel.k
- artifactId: camel-k-runtime-yaml
+ artifactId: camel-k-loader-yaml
- groupId: org.apache.camel.k
artifactId: camel-knative
- groupId: org.apache.camel.k
@@ -1381,12 +1414,33 @@ spec:
groupId: org.apache.camel.k
artifactId: camel-k-runtime-kotlin
version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-kotlin
+ camel-k-runtime-main:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-main
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-core-engine
+ - groupId: org.apache.camel
+ artifactId: camel-main
+ - groupId: org.apache.camel
+ artifactId: camel-properties
camel-k-runtime-servlet:
groupId: org.apache.camel.k
artifactId: camel-k-runtime-servlet
dependencies:
- groupId: org.apache.camel
artifactId: camel-servlet
+ camel-k-runtime-yaml:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-yaml
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-yaml
camel-kafka:
groupId: org.apache.camel
artifactId: camel-kafka
@@ -3397,11 +3451,10 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:groovy
- - camel:core
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-groovy
`
- Resources["platform-integration-kit-jvm.yaml"] =
+ Resources["platform-integration-kit-java.yaml"] =
`
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -3423,7 +3476,7 @@ spec:
apiVersion: camel.apache.org/v1alpha1
kind: IntegrationKit
metadata:
- name: jvm
+ name: java
labels:
app: "camel-k"
camel.apache.org/kit.created.by.kind: Operator
@@ -3431,8 +3484,41 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - camel:core
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-java
+`
+ Resources["platform-integration-kit-js.yaml"] =
+ `
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: IntegrationKit
+metadata:
+ name: js
+ labels:
+ app: "camel-k"
+ camel.apache.org/kit.created.by.kind: Operator
+ camel.apache.org/kit.created.by.name: camel-k-operator
+ camel.apache.org/kit.type: platform
+spec:
+ dependencies:
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-js
`
Resources["platform-integration-kit-knative.yaml"] =
`
@@ -3464,10 +3550,8 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:yaml
- - camel:core
- - camel-k:knative
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-runtime-knative
`
Resources["platform-integration-kit-kotlin.yaml"] =
`
@@ -3499,9 +3583,106 @@ metadata:
camel.apache.org/kit.type: platform
spec:
dependencies:
- - runtime:jvm
- - runtime:kotlin
- - camel:core
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-kotlin
+`
+ Resources["platform-integration-kit-main.yaml"] =
+ `
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: IntegrationKit
+metadata:
+ name: main
+ labels:
+ app: "camel-k"
+ camel.apache.org/kit.created.by.kind: Operator
+ camel.apache.org/kit.created.by.name: camel-k-operator
+ camel.apache.org/kit.type: platform
+spec:
+ dependencies:
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+`
+ Resources["platform-integration-kit-xml.yaml"] =
+ `
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: IntegrationKit
+metadata:
+ name: xml
+ labels:
+ app: "camel-k"
+ camel.apache.org/kit.created.by.kind: Operator
+ camel.apache.org/kit.created.by.name: camel-k-operator
+ camel.apache.org/kit.type: platform
+spec:
+ dependencies:
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-js
+`
+ Resources["platform-integration-kit-yaml.yaml"] =
+ `
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: IntegrationKit
+metadata:
+ name: yaml
+ labels:
+ app: "camel-k"
+ camel.apache.org/kit.created.by.kind: Operator
+ camel.apache.org/kit.created.by.name: camel-k-operator
+ camel.apache.org/kit.type: platform
+spec:
+ dependencies:
+ - mvn:org.apache.camel.k/camel-k-runtime-main
+ - mvn:org.apache.camel.k/camel-k-loader-yaml
`
Resources["user-cluster-role.yaml"] =
`
diff --git a/e2e/build_test.go b/e2e/build_test.go
index 2b8aa5d..57dc3b8 100644
--- a/e2e/build_test.go
+++ b/e2e/build_test.go
@@ -29,8 +29,8 @@ import (
. "github.com/onsi/gomega"
)
-func TestKitJVMFullBuild(t *testing.T) {
- doNamedKitFullBuild(t, "jvm")
+func TestKitMainFullBuild(t *testing.T) {
+ doNamedKitFullBuild(t, "main")
}
func TestKitGroovyFullBuild(t *testing.T) {
@@ -41,6 +41,22 @@ func TestKitKotlinFullBuild(t *testing.T) {
doNamedKitFullBuild(t, "kotlin")
}
+func TestKitJSFullBuild(t *testing.T) {
+ doNamedKitFullBuild(t, "js")
+}
+
+func TestKitXMLFullBuild(t *testing.T) {
+ doNamedKitFullBuild(t, "xml")
+}
+
+func TestKitJavaFullBuild(t *testing.T) {
+ doNamedKitFullBuild(t, "java")
+}
+
+func TestKitYAMLFullBuild(t *testing.T) {
+ doNamedKitFullBuild(t, "yaml")
+}
+
func TestKitHealthFullBuild(t *testing.T) {
doNamedKitFullBuild(t, "knative")
}
diff --git a/e2e/install_test.go b/e2e/install_test.go
index 4cb41f8..f43bffd 100644
--- a/e2e/install_test.go
+++ b/e2e/install_test.go
@@ -43,11 +43,11 @@ func TestAlternativeImageInstallation(t *testing.T) {
})
}
-func TestKitJVMInstallation(t *testing.T) {
+func TestKitMainInstallation(t *testing.T) {
withNewTestNamespace(func(ns string) {
RegisterTestingT(t)
- Expect(kamel("install", "-n", ns, "--kit",
"jvm").Execute()).Should(BeNil())
- Eventually(build(ns, "jvm")).ShouldNot(BeNil())
+ Expect(kamel("install", "-n", ns, "--kit",
"main").Execute()).Should(BeNil())
+ Eventually(build(ns, "main")).ShouldNot(BeNil())
})
}
@@ -56,9 +56,8 @@ func TestMavenRepositoryInstallation(t *testing.T) {
RegisterTestingT(t)
Expect(kamel("install", "-n", ns, "--maven-repository",
"https://my.repo.org/public/").Execute()).Should(BeNil())
Eventually(configmap(ns,
"camel-k-maven-settings")).Should(Not(BeNil()))
- Eventually(func()string {
+ Eventually(func() string {
return configmap(ns,
"camel-k-maven-settings")().Data["settings.xml"]
}).Should(ContainSubstring("https://my.repo.org/public/"))
})
}
-
diff --git a/pkg/apis/camel/v1alpha1/integration_types_support_test.go
b/pkg/apis/camel/v1alpha1/integration_types_support_test.go
index 0911c59..148d9e6 100644
--- a/pkg/apis/camel/v1alpha1/integration_types_support_test.go
+++ b/pkg/apis/camel/v1alpha1/integration_types_support_test.go
@@ -63,18 +63,14 @@ func TestLanguageAlreadySet(t *testing.T) {
func TestAddDependency(t *testing.T) {
integration := IntegrationSpec{}
- integration.AddDependency("camel-ciaone")
- assert.Equal(t, integration.Dependencies, []string{"camel:ciaone"})
+ integration.AddDependency("camel-file")
+ assert.Equal(t, integration.Dependencies, []string{"camel:file"})
integration = IntegrationSpec{}
- integration.AddDependency("runtime:ciaone")
- assert.Equal(t, integration.Dependencies, []string{"runtime:ciaone"})
+ integration.AddDependency("mvn:com.my/company")
+ assert.Equal(t, integration.Dependencies,
[]string{"mvn:com.my/company"})
integration = IntegrationSpec{}
- integration.AddDependency("mvn:ciaone")
- assert.Equal(t, integration.Dependencies, []string{"mvn:ciaone"})
-
- integration = IntegrationSpec{}
- integration.AddDependency("file:ciaone")
- assert.Equal(t, integration.Dependencies, []string{"file:ciaone"})
+ integration.AddDependency("file:dep")
+ assert.Equal(t, integration.Dependencies, []string{"file:dep"})
}
diff --git a/pkg/builder/builder_steps.go b/pkg/builder/builder_steps.go
index ea34d52..81cd13a 100644
--- a/pkg/builder/builder_steps.go
+++ b/pkg/builder/builder_steps.go
@@ -29,8 +29,6 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/scylladb/go-set/strset"
-
"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
"github.com/apache/camel-k/pkg/util/maven"
"github.com/apache/camel-k/pkg/util/tar"
@@ -122,10 +120,6 @@ func generateProject(ctx *Context) error {
}
ctx.Maven.Project = p
- //
- // set-up dependencies
- //
- ctx.Maven.Project.AddDependencyGAV("org.apache.camel.k",
"camel-k-runtime-jvm", ctx.Build.RuntimeVersion)
for _, d := range ctx.Build.Dependencies {
switch {
@@ -140,20 +134,16 @@ func generateProject(ctx *Context) error {
case strings.HasPrefix(d, "camel-k:"):
artifactID := strings.TrimPrefix(d, "camel-k:")
- if !strings.HasPrefix(artifactID, "camel-") {
- artifactID = "camel-" + artifactID
+ if !strings.HasPrefix(artifactID, "camel-k-") {
+ artifactID = "camel-k-" + artifactID
}
-
ctx.Maven.Project.AddDependencyGAV("org.apache.camel.k", artifactID,
ctx.Build.RuntimeVersion)
+
ctx.Maven.Project.AddDependencyGAV("org.apache.camel.k", artifactID, "")
case strings.HasPrefix(d, "mvn:"):
mid := strings.TrimPrefix(d, "mvn:")
gav := strings.Replace(mid, "/", ":", -1)
ctx.Maven.Project.AddEncodedDependencyGAV(gav)
- case strings.HasPrefix(d, "runtime:"):
- artifactID := strings.Replace(d, "runtime:",
"camel-k-runtime-", 1)
-
-
ctx.Maven.Project.AddDependencyGAV("org.apache.camel.k", artifactID,
ctx.Build.RuntimeVersion)
case strings.HasPrefix(d, "bom:"):
// no-op
default:
@@ -244,10 +234,9 @@ func sanitizeDependencies(ctx *Context) error {
ctx.Maven.Project.Dependencies[i].Version = ""
case "org.apache.camel.k":
//
- // Force every runtime dependency to have the required
version discardin
- // any version eventually set on the catalog
+ // Remove the version so we force using the one
configured by the bom
//
- ctx.Maven.Project.Dependencies[i].Version =
ctx.Build.RuntimeVersion
+ ctx.Maven.Project.Dependencies[i].Version = ""
}
}
@@ -323,7 +312,7 @@ func incrementalPackager(ctx *Context) error {
return packager(ctx, func(ctx *Context) error {
ctx.SelectedArtifacts = ctx.Artifacts
- bestImage, commonLibs := findBestImage(images,
ctx.Build.Dependencies, ctx.Artifacts)
+ bestImage, commonLibs := findBestImage(images, ctx.Artifacts)
if bestImage.Image != "" {
selectedArtifacts := make([]v1alpha1.Artifact, 0)
for _, entry := range ctx.Artifacts {
@@ -420,7 +409,7 @@ func listPublishedImages(context *Context)
([]publishedImage, error) {
return images, nil
}
-func findBestImage(images []publishedImage, dependencies []string, artifacts
[]v1alpha1.Artifact) (publishedImage, map[string]bool) {
+func findBestImage(images []publishedImage, artifacts []v1alpha1.Artifact)
(publishedImage, map[string]bool) {
var bestImage publishedImage
if len(images) == 0 {
@@ -432,33 +421,10 @@ func findBestImage(images []publishedImage, dependencies
[]string, artifacts []v
requiredLibs[entry.ID] = true
}
- requiredRuntimes := strset.New()
- for _, entry := range dependencies {
- if strings.HasPrefix(entry, "runtime:") {
- requiredRuntimes.Add(entry)
- }
- }
-
bestImageCommonLibs := make(map[string]bool)
bestImageSurplusLibs := 0
for _, image := range images {
- runtimes := strset.New()
- for _, entry := range image.Dependencies {
- if strings.HasPrefix(entry, "runtime:") {
- runtimes.Add(entry)
- }
- }
-
- //
- // check if the image has the same runtime requirements to
avoid the heuristic
- // selector to include unwanted runtime bits such as
spring-boot (which may have
- // an additional artifact only thus it may match)
- //
- if !requiredRuntimes.IsSubset(runtimes) {
- continue
- }
-
common := make(map[string]bool)
for _, artifact := range image.Artifacts {
if _, ok := requiredLibs[artifact.ID]; ok {
diff --git a/pkg/builder/builder_steps_test.go
b/pkg/builder/builder_steps_test.go
index 61f622c..51a76b8 100644
--- a/pkg/builder/builder_steps_test.go
+++ b/pkg/builder/builder_steps_test.go
@@ -65,7 +65,7 @@ func TestGenerateJvmProject(t *testing.T) {
},
},
Dependencies: []string{
- "runtime:jvm",
+ "camel-k:runtime-main",
},
},
}
@@ -102,9 +102,7 @@ func TestGenerateJvmProject(t *testing.T) {
[]maven.Dependency{
{
GroupID: "org.apache.camel.k",
- ArtifactID: "camel-k-runtime-jvm",
- Version: defaults.RuntimeVersion,
- Type: "jar",
+ ArtifactID: "camel-k-runtime-main",
},
{
GroupID: "org.apache.camel",
@@ -240,7 +238,8 @@ func TestGenerateGroovyProject(t *testing.T) {
},
},
Dependencies: []string{
- "runtime:groovy",
+ "camel-k:runtime-main",
+ "camel-k:loader-groovy",
},
},
}
@@ -277,15 +276,11 @@ func TestGenerateGroovyProject(t *testing.T) {
[]maven.Dependency{
{
GroupID: "org.apache.camel.k",
- ArtifactID: "camel-k-runtime-jvm",
- Version: defaults.RuntimeVersion,
- Type: "jar",
+ ArtifactID: "camel-k-runtime-main",
},
{
GroupID: "org.apache.camel.k",
- ArtifactID: "camel-k-runtime-groovy",
- Version: defaults.RuntimeVersion,
- Type: "jar",
+ ArtifactID: "camel-k-loader-groovy",
},
{
GroupID: "org.apache.camel",
@@ -323,7 +318,7 @@ func TestSanitizeDependencies(t *testing.T) {
Dependencies: []string{
"camel:undertow",
"mvn:org.apache.camel/camel-core/2.18.0",
-
"mvn:org.apache.camel.k/camel-k-runtime-jvm/1.0.0",
+
"mvn:org.apache.camel.k/camel-k-runtime-main/1.0.0",
"mvn:com.mycompany/my-dep/1.2.3",
},
},
@@ -338,25 +333,20 @@ func TestSanitizeDependencies(t *testing.T) {
assert.Contains(t, ctx.Maven.Project.Dependencies, maven.Dependency{
GroupID: "org.apache.camel.k",
- ArtifactID: "camel-k-runtime-jvm",
- Version: defaults.RuntimeVersion,
- Type: "jar",
+ ArtifactID: "camel-k-runtime-main",
})
assert.Contains(t, ctx.Maven.Project.Dependencies, maven.Dependency{
GroupID: "org.apache.camel",
ArtifactID: "camel-core",
- Type: "jar",
})
assert.Contains(t, ctx.Maven.Project.Dependencies, maven.Dependency{
GroupID: "org.apache.camel",
ArtifactID: "camel-undertow",
- Type: "jar",
})
assert.Contains(t, ctx.Maven.Project.Dependencies, maven.Dependency{
GroupID: "com.mycompany",
ArtifactID: "my-dep",
Version: "1.2.3",
- Type: "jar",
})
}
diff --git a/pkg/builder/builder_utils_test.go
b/pkg/builder/builder_utils_test.go
index 0529796..0fc39d1 100644
--- a/pkg/builder/builder_utils_test.go
+++ b/pkg/builder/builder_utils_test.go
@@ -42,7 +42,7 @@ func TestNewProject(t *testing.T) {
},
},
Dependencies: []string{
- "runtime:jvm",
+ "camel-k:runtime-main",
"bom:my.company/my-artifact-1/1.0.0",
"bom:my.company/my-artifact-2/2.0.0",
},
diff --git a/pkg/cmd/completion_bash.go b/pkg/cmd/completion_bash.go
index 58d1aaa..ee53550 100644
--- a/pkg/cmd/completion_bash.go
+++ b/pkg/cmd/completion_bash.go
@@ -87,11 +87,6 @@ __kamel_languages() {
COMPREPLY=( $( compgen -W "${type_list}" -- "$cur") )
}
-__kamel_runtimes() {
- local type_list="jvm groovy kotlin"
- COMPREPLY=( $( compgen -W "${type_list}" -- "$cur") )
-}
-
__kamel_deletion_policy() {
local type_list="owner label"
COMPREPLY=( $( compgen -W "${type_list}" -- "$cur") )
@@ -237,13 +232,6 @@ func configureKnownBashCompletions(command *cobra.Command)
{
)
configureBashAnnotationForFlag(
command,
- "runtime",
- map[string][]string{
- cobra.BashCompCustom: {"__kamel_runtimes"},
- },
- )
- configureBashAnnotationForFlag(
- command,
"trait",
map[string][]string{
cobra.BashCompCustom: {"__kamel_traits"},
diff --git a/pkg/cmd/kit_create.go b/pkg/cmd/kit_create.go
index d7710c3..a71b5c1 100644
--- a/pkg/cmd/kit_create.go
+++ b/pkg/cmd/kit_create.go
@@ -48,7 +48,6 @@ func newKitCreateCmd(rootCmdOptions *RootCmdOptions)
*cobra.Command {
RunE: impl.run,
}
- cmd.Flags().StringVarP(&impl.runtime, "runtime", "r", "jvm", "Runtime
provided by the kit")
cmd.Flags().StringVar(&impl.image, "image", "", "Image used to create
the kit")
cmd.Flags().StringSliceVarP(&impl.dependencies, "dependency", "d", nil,
"Add a dependency")
cmd.Flags().StringSliceVarP(&impl.properties, "property", "p", nil,
"Add a camel property")
@@ -66,7 +65,6 @@ func newKitCreateCmd(rootCmdOptions *RootCmdOptions)
*cobra.Command {
type kitCreateCommand struct {
*RootCmdOptions
- runtime string
image string
dependencies []string
properties []string
@@ -150,13 +148,6 @@ func (command *kitCreateCommand) run(_ *cobra.Command,
args []string) error {
}
}
- // jvm runtime required by default
- util.StringSliceUniqueAdd(&ctx.Spec.Dependencies, "runtime:jvm")
-
- if command.runtime != "" {
- util.StringSliceUniqueAdd(&ctx.Spec.Dependencies,
"runtime:"+command.runtime)
- }
-
for _, item := range command.properties {
ctx.Spec.Configuration = append(ctx.Spec.Configuration,
v1alpha1.ConfigurationSpec{
Type: "property",
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index dee78b0..0853753 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -66,7 +66,6 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) *cobra.Command
{
RunE: options.run,
}
- cmd.Flags().StringVarP(&options.Runtime, "runtime", "r", "", "Runtime
used by the integration")
cmd.Flags().StringVar(&options.IntegrationName, "name", "", "The
integration name")
cmd.Flags().StringSliceVarP(&options.Dependencies, "dependency", "d",
nil, "The integration dependency")
cmd.Flags().BoolVarP(&options.Wait, "wait", "w", false, "Waits for the
integration to be running")
@@ -105,7 +104,6 @@ type runCmdOptions struct {
Dev bool
DeletionPolicy string
IntegrationKit string
- Runtime string
IntegrationName string
Profile string
OutputFormat string
@@ -364,10 +362,6 @@ func (o *runCmdOptions) updateIntegrationCode(c
client.Client, sources []string)
}
}
- if o.Runtime != "" {
- integration.Spec.AddDependency("runtime:" + o.Runtime)
- }
-
for _, item := range o.Dependencies {
integration.Spec.AddDependency(item)
}
diff --git a/pkg/trait/camel.go b/pkg/trait/camel.go
index 03e0b25..29f66b2 100644
--- a/pkg/trait/camel.go
+++ b/pkg/trait/camel.go
@@ -114,9 +114,11 @@ func (t *camelTrait) Apply(e *Environment) error {
if e.Integration != nil {
e.Integration.Status.CamelVersion = e.CamelCatalog.Version
+ e.Integration.Status.RuntimeVersion = rv
}
if e.IntegrationKit != nil {
e.IntegrationKit.Status.CamelVersion = e.CamelCatalog.Version
+ e.IntegrationKit.Status.RuntimeVersion = rv
}
return nil
diff --git a/pkg/trait/dependencies.go b/pkg/trait/dependencies.go
index 47a86a9..2fd1a56 100644
--- a/pkg/trait/dependencies.go
+++ b/pkg/trait/dependencies.go
@@ -55,15 +55,23 @@ func (t *dependenciesTrait) Apply(e *Environment) error {
switch s.InferLanguage() {
case v1alpha1.LanguageGroovy:
- util.StringSliceUniqueAdd(&dependencies,
"runtime:groovy")
+ util.StringSliceUniqueAdd(&dependencies,
"mvn:org.apache.camel.k/camel-k-loader-groovy")
case v1alpha1.LanguageKotlin:
- util.StringSliceUniqueAdd(&dependencies,
"runtime:kotlin")
+ util.StringSliceUniqueAdd(&dependencies,
"mvn:org.apache.camel.k/camel-k-loader-kotlin")
case v1alpha1.LanguageYaml:
- util.StringSliceUniqueAdd(&dependencies, "runtime:yaml")
+ util.StringSliceUniqueAdd(&dependencies,
"mvn:org.apache.camel.k/camel-k-loader-yaml")
+ case v1alpha1.LanguageXML:
+ util.StringSliceUniqueAdd(&dependencies,
"mvn:org.apache.camel.k/camel-k-loader-xml")
+ case v1alpha1.LanguageJavaScript:
+ util.StringSliceUniqueAdd(&dependencies,
"mvn:org.apache.camel.k/camel-k-loader-js")
+ case v1alpha1.LanguageJavaClass:
+ util.StringSliceUniqueAdd(&dependencies,
"mvn:org.apache.camel.k/camel-k-loader-java")
+ case v1alpha1.LanguageJavaSource:
+ util.StringSliceUniqueAdd(&dependencies,
"mvn:org.apache.camel.k/camel-k-loader-java")
}
- // jvm runtime required by default
- util.StringSliceUniqueAdd(&dependencies, "runtime:jvm")
+ // main required by default
+ util.StringSliceUniqueAdd(&dependencies,
"mvn:org.apache.camel.k/camel-k-runtime-main")
for _, d := range meta.Dependencies {
util.StringSliceUniqueAdd(&dependencies, d)
diff --git a/pkg/trait/dependencies_test.go b/pkg/trait/dependencies_test.go
index e3b0cd4..3744264 100644
--- a/pkg/trait/dependencies_test.go
+++ b/pkg/trait/dependencies_test.go
@@ -78,7 +78,11 @@ func TestIntegrationDefaultDeps(t *testing.T) {
err = trait.Apply(e)
assert.Nil(t, err)
- assert.ElementsMatch(t, []string{"camel:direct", "camel:log",
"runtime:jvm"}, e.Integration.Status.Dependencies)
+ assert.ElementsMatch(
+ t,
+ []string{"camel:direct", "camel:log",
"mvn:org.apache.camel.k/camel-k-loader-java",
"mvn:org.apache.camel.k/camel-k-runtime-main"},
+ e.Integration.Status.Dependencies,
+ )
}
func TestIntegrationCustomDeps(t *testing.T) {
@@ -116,6 +120,8 @@ func TestIntegrationCustomDeps(t *testing.T) {
err = trait.Apply(e)
assert.Nil(t, err)
- assert.ElementsMatch(t, []string{"camel:direct", "camel:log",
- "camel:undertow", "org.foo:bar", "runtime:jvm"},
e.Integration.Status.Dependencies)
+ assert.ElementsMatch(t,
+ []string{"camel:direct", "camel:log", "camel:undertow",
"org.foo:bar", "mvn:org.apache.camel.k/camel-k-loader-java",
"mvn:org.apache.camel.k/camel-k-runtime-main"},
+ e.Integration.Status.Dependencies,
+ )
}
diff --git a/pkg/trait/deployment.go b/pkg/trait/deployment.go
index 86bda93..157ef84 100644
--- a/pkg/trait/deployment.go
+++ b/pkg/trait/deployment.go
@@ -129,9 +129,6 @@ func (t *deploymentTrait) getDeploymentFor(e *Environment)
*appsv1.Deployment {
envvar.SetVal(&environment, key, value)
}
- // set env vars needed by the runtime
- envvar.SetVal(&environment, "JAVA_MAIN_CLASS",
"org.apache.camel.k.jvm.Application")
-
// camel-k runtime
envvar.SetVal(&environment, "CAMEL_K_ROUTES", strings.Join(paths, ","))
envvar.SetVal(&environment, "CAMEL_K_CONF",
"/etc/camel/conf/application.properties")
diff --git a/pkg/trait/environment.go b/pkg/trait/environment.go
index b12d285..c282e34 100644
--- a/pkg/trait/environment.go
+++ b/pkg/trait/environment.go
@@ -34,6 +34,8 @@ const (
envVarCamelKVersion = "CAMEL_K_VERSION"
envVarCamelKRuntimeVersion = "CAMEL_K_RUNTIME_VERSION"
envVarCamelVersion = "CAMEL_VERSION"
+ envVarMainClass = "JAVA_MAIN_CLASS"
+ defaultMainClass = "org.apache.camel.k.main.Application"
)
func newEnvironmentTrait() *environmentTrait {
@@ -61,5 +63,7 @@ func (t *environmentTrait) Apply(e *Environment) error {
envvar.SetValFrom(&e.EnvVars, envVarPodName, "metadata.name")
}
+ envvar.SetVal(&e.EnvVars, envVarMainClass, defaultMainClass)
+
return nil
}
diff --git a/pkg/trait/knative_service.go b/pkg/trait/knative_service.go
index db674de..1c916cb 100644
--- a/pkg/trait/knative_service.go
+++ b/pkg/trait/knative_service.go
@@ -228,9 +228,6 @@ func (t *knativeServiceTrait) getServiceFor(e *Environment)
*serving.Service {
envvar.SetVal(environment, key, value)
}
- // set env vars needed by the runtime
- envvar.SetVal(environment, "JAVA_MAIN_CLASS",
"org.apache.camel.k.jvm.Application")
-
// add a dummy env var to trigger deployment if everything but the code
// has been changed
envvar.SetVal(environment, "CAMEL_K_DIGEST",
e.Integration.Status.Digest)
diff --git a/pkg/trait/probes.go b/pkg/trait/probes.go
index 1cfb46a..1155a2e 100644
--- a/pkg/trait/probes.go
+++ b/pkg/trait/probes.go
@@ -66,7 +66,7 @@ func (t *probesTrait) Configure(e *Environment) (bool, error)
{
func (t *probesTrait) Apply(e *Environment) error {
if e.IntegrationInPhase(v1alpha1.IntegrationPhaseInitialization) {
- util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies,
"runtime:health")
+ util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies,
"mvn:org.apache.camel.k/camel-k-runtime-health")
// sort the dependencies to get always the same list if they
don't change
sort.Strings(e.Integration.Status.Dependencies)
diff --git a/pkg/trait/probes_test.go b/pkg/trait/probes_test.go
index 90b6b56..47f6d71 100644
--- a/pkg/trait/probes_test.go
+++ b/pkg/trait/probes_test.go
@@ -51,7 +51,7 @@ func TestProbesDeps(t *testing.T) {
err = tr.Apply(&e)
assert.Nil(t, err)
- assert.Contains(t, e.Integration.Status.Dependencies, "runtime:health")
+ assert.Contains(t, e.Integration.Status.Dependencies,
"mvn:org.apache.camel.k/camel-k-runtime-health")
}
func TestProbesOnDeployment(t *testing.T) {
diff --git a/pkg/util/maven/maven.go b/pkg/util/maven/maven.go
index 8fbe80f..a881bd4 100644
--- a/pkg/util/maven/maven.go
+++ b/pkg/util/maven/maven.go
@@ -147,7 +147,6 @@ func ParseGAV(gav string) (Dependency, error) {
dep.GroupID = res[1]
dep.ArtifactID = res[2]
- dep.Type = "jar"
cnt := strings.Count(gav, ":")
switch cnt {
diff --git a/pkg/util/maven/maven_project.go b/pkg/util/maven/maven_project.go
index db4ea04..8b3e167 100644
--- a/pkg/util/maven/maven_project.go
+++ b/pkg/util/maven/maven_project.go
@@ -147,7 +147,7 @@ func NewDependency(groupID string, artifactID string,
version string) Dependency
GroupID: groupID,
ArtifactID: artifactID,
Version: version,
- Type: "jar",
+ Type: "",
Classifier: "",
}
}
diff --git a/pkg/util/maven/maven_project_test.go
b/pkg/util/maven/maven_project_test.go
index d717d7f..aad5238 100644
--- a/pkg/util/maven/maven_project_test.go
+++ b/pkg/util/maven/maven_project_test.go
@@ -140,7 +140,7 @@ func TestParseSimpleGAV(t *testing.T) {
assert.Equal(t, dep.GroupID, "org.apache.camel")
assert.Equal(t, dep.ArtifactID, "camel-core")
assert.Equal(t, dep.Version, "2.21.1")
- assert.Equal(t, dep.Type, "jar")
+ assert.Equal(t, dep.Type, "")
assert.Equal(t, dep.Classifier, "")
}
diff --git a/script/Makefile b/script/Makefile
index 4f6bdcb..13b8c78 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -102,7 +102,7 @@ test: build
go test ./...
test-integration: build
- go test -v ./e2e/... -tags=integration
+ go test -timeout 30m -v ./e2e/... -tags=integration
build-operator:
go build $(GOFLAGS) -o camel-k ./cmd/manager/*.go