Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use non deprecated components #4616

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/modules/ROOT/pages/configuration/dependencies.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions pkg/metadata/metadata_dependencies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -52,7 +52,7 @@ func TestDependenciesJavaSource(t *testing.T) {
assert.ElementsMatch(
t,
[]string{
"camel:activemq",
"camel:kafka",
"camel:amqp",
"camel:log",
"camel:telegram",
Expand All @@ -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");
Expand All @@ -86,7 +86,7 @@ func TestDependenciesJavaScript(t *testing.T) {
assert.ElementsMatch(
t,
[]string{
"camel:activemq",
"camel:kafka",
"camel:amqp",
"camel:log",
"camel:telegram",
Expand All @@ -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");
Expand All @@ -121,7 +121,7 @@ func TestDependenciesGroovy(t *testing.T) {
assert.ElementsMatch(
t,
[]string{
"camel:activemq",
"camel:kafka",
"camel:amqp",
"camel:log",
"camel:telegram",
Expand Down
2 changes: 1 addition & 1 deletion pkg/metadata/metadata_http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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");
`,
},
Expand Down
2 changes: 1 addition & 1 deletion release.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.