You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/07/26 15:35:07 UTC

[camel-k] branch main updated (925f3afe9 -> 4f7049705)

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

pcongiusti pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


    from 925f3afe9 doc(trait): Add some documentation on maven profile trait
     new 5cc092f15 fix: use non deprecated components
     new 4f7049705 chore(doc): some dependency feature

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ROOT/pages/configuration/dependencies.adoc     | 22 ++++++++++++++++++++++
 pkg/metadata/metadata_dependencies_test.go         | 12 ++++++------
 pkg/metadata/metadata_http_test.go                 |  2 +-
 release.adoc                                       |  2 +-
 4 files changed, 30 insertions(+), 8 deletions(-)


[camel-k] 02/02: chore(doc): some dependency feature

Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4f70497054706f0b7484734c6e901a52e93dda0a
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed Jul 26 15:32:57 2023 +0200

    chore(doc): some dependency feature
---
 .../ROOT/pages/configuration/dependencies.adoc     | 22 ++++++++++++++++++++++
 release.adoc                                       |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/configuration/dependencies.adoc b/docs/modules/ROOT/pages/configuration/dependencies.adoc
index 78861d15b..5edff4a4c 100644
--- a/docs/modules/ROOT/pages/configuration/dependencies.adoc
+++ b/docs/modules/ROOT/pages/configuration/dependencies.adoc
@@ -17,6 +17,28 @@ Automatic resolution is also a nice feature in xref:running/dev-mode.adoc[dev mo
 
 NOTE: Camel K won't be able to resolve automatically the dependencies when your routes specify dynamic URIs.
 
+[[dependencies-from-import]]
+== Import path dependencies
+
+While developing your route, you will start including references to Camel dependencies via Java (or any other DSL) import mechanism. Camel K is able to scan and detect such dependencies as well. Take the following example:
+
+```java
+import org.apache.camel.builder.RouteBuilder;
+...
+import org.apache.camel.component.kafka.KafkaComponent;
+
+public class Test extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("timer:java?period={{time:1000}}").
+            ...
+    }
+}
+
+```
+Camel K will be able to include `camel-kafka` dependency as it discover scanning the import paths. No need to specify it in such circumstances.
+
 [[dependencies-explicit]]
 == Add explicit dependencies
 
diff --git a/release.adoc b/release.adoc
index 5440b7b14..e7c9b2629 100644
--- a/release.adoc
+++ b/release.adoc
@@ -265,6 +265,6 @@ git push upstream main
 ```
 Where <new-version> represents the new version you want to bump and <replace-version> the version that was previously released.
 
-Note: this action should also replace automatically the oldest nightly release Github Action with the newest one just created.
+NOTE: this action should also replace automatically the oldest nightly release Github Action with the newest one just created.
 
 You will also need to update the `docs/antora.yml` configuration in order to provide the proper versions for the upcoming release in `main` branch.


[camel-k] 01/02: fix: use non deprecated components

Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5cc092f1536410e5f0810c965f84278f210c507a
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed Jul 26 15:22:34 2023 +0200

    fix: use non deprecated components
---
 pkg/metadata/metadata_dependencies_test.go | 12 ++++++------
 pkg/metadata/metadata_http_test.go         |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pkg/metadata/metadata_dependencies_test.go b/pkg/metadata/metadata_dependencies_test.go
index 6ce6f0275..d252a8453 100644
--- a/pkg/metadata/metadata_dependencies_test.go
+++ b/pkg/metadata/metadata_dependencies_test.go
@@ -32,7 +32,7 @@ func TestDependenciesJavaSource(t *testing.T) {
 		DataSpec: v1.DataSpec{
 			Name: "Request.java",
 			Content: `
-			    import org.apache.camel.component.activemq.ActiveMQComponent;
+			    import org.apache.camel.component.kafka.KafkaComponent;
 
 			    from("telegram:bots/cippa").to("log:stash");
 			    from("timer:tick").to("amqp:queue");
@@ -52,7 +52,7 @@ func TestDependenciesJavaSource(t *testing.T) {
 	assert.ElementsMatch(
 		t,
 		[]string{
-			"camel:activemq",
+			"camel:kafka",
 			"camel:amqp",
 			"camel:log",
 			"camel:telegram",
@@ -67,7 +67,7 @@ func TestDependenciesJavaScript(t *testing.T) {
 		DataSpec: v1.DataSpec{
 			Name: "source.js",
 			Content: `
-			    var component = Java.type("org.apache.camel.component.activemq.ActiveMQComponent");
+			    var component = Java.type("org.apache.camel.component.kafka.KafkaComponent");
 
 			    from('telegram:bots/cippa').to("log:stash");
 			    from('timer:tick').to("amqp:queue");
@@ -86,7 +86,7 @@ func TestDependenciesJavaScript(t *testing.T) {
 	assert.ElementsMatch(
 		t,
 		[]string{
-			"camel:activemq",
+			"camel:kafka",
 			"camel:amqp",
 			"camel:log",
 			"camel:telegram",
@@ -100,7 +100,7 @@ func TestDependenciesGroovy(t *testing.T) {
 		DataSpec: v1.DataSpec{
 			Name: "source.groovy",
 			Content: `
-			    import org.apache.camel.component.activemq.ActiveMQComponent;
+			    import org.apache.camel.component.kafka.KafkaComponent;
 
 			    from('telegram:bots/cippa').to("log:stash");
 			    from('timer:tick').to("amqp:queue");
@@ -121,7 +121,7 @@ func TestDependenciesGroovy(t *testing.T) {
 	assert.ElementsMatch(
 		t,
 		[]string{
-			"camel:activemq",
+			"camel:kafka",
 			"camel:amqp",
 			"camel:log",
 			"camel:telegram",
diff --git a/pkg/metadata/metadata_http_test.go b/pkg/metadata/metadata_http_test.go
index 5572d6459..7f095105a 100644
--- a/pkg/metadata/metadata_http_test.go
+++ b/pkg/metadata/metadata_http_test.go
@@ -101,7 +101,7 @@ func TestHttpOnlyJavaSourceRest2(t *testing.T) {
 		DataSpec: v1.DataSpec{
 			Name: "Request.java",
 			Content: `
-			from("vm:bots/cippa").to("log:stash");
+			from("seda:bots/cippa").to("log:stash");
 			rest( ).get("").to("log:stash");
 		`,
 		},