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

Upgrade camel to 4.5.0 #5921

Merged
merged 4 commits into from
Apr 2, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.TreeMap;

import org.apache.camel.catalog.CamelCatalog;
import org.apache.camel.catalog.RuntimeProvider;
Expand All @@ -34,12 +37,19 @@ public class QuarkusRuntimeProvider implements RuntimeProvider {

private static final String COMPONENT_DIR = "org/apache/camel/catalog/quarkus/components";
private static final String DATAFORMAT_DIR = "org/apache/camel/catalog/quarkus/dataformats";
private static final String DEV_CONSOLE_DIR = "org/apache/camel/catalog/quarkus/consoles";
private static final String LANGUAGE_DIR = "org/apache/camel/catalog/quarkus/languages";
private static final String TRANSFORMER_DIR = "org/apache/camel/catalog/quarkus/transformers";
private static final String OTHER_DIR = "org/apache/camel/catalog/quarkus/others";
private static final String BEANS_DIR = "org/apache/camel/catalog/beans";
private static final String CAPABILITIES_CATALOG = "org/apache/camel/catalog/quarkus/capabilities.properties";
private static final String COMPONENTS_CATALOG = "org/apache/camel/catalog/quarkus/components.properties";
private static final String DEV_CONSOLE_CATALOG = "org/apache/camel/catalog/quarkus/consoles.properties";
private static final String DATA_FORMATS_CATALOG = "org/apache/camel/catalog/quarkus/dataformats.properties";
private static final String LANGUAGE_CATALOG = "org/apache/camel/catalog/quarkus/languages.properties";
private static final String TRANSFORMER_CATALOG = "org/apache/camel/catalog/quarkus/transformers.properties";
private static final String OTHER_CATALOG = "org/apache/camel/catalog/quarkus/others.properties";
private static final String BEANS_CATALOG = "org/apache/camel/catalog/quarkus/beans.properties";

private CamelCatalog camelCatalog;

Expand Down Expand Up @@ -78,16 +88,31 @@ public String getDataFormatJSonSchemaDirectory() {
return DATAFORMAT_DIR;
}

@Override
public String getDevConsoleJSonSchemaDirectory() {
return DEV_CONSOLE_DIR;
}

@Override
public String getLanguageJSonSchemaDirectory() {
return LANGUAGE_DIR;
}

@Override
public String getTransformerJSonSchemaDirectory() {
return TRANSFORMER_DIR;
}

@Override
public String getOtherJSonSchemaDirectory() {
return OTHER_DIR;
}

@Override
public String getPojoBeanJSonSchemaDirectory() {
return BEANS_DIR;
}

@Override
public List<String> findComponentNames() {
List<String> names = new ArrayList<>();
Expand Down Expand Up @@ -116,6 +141,20 @@ public List<String> findDataFormatNames() {
return names;
}

@Override
public List<String> findDevConsoleNames() {
List<String> names = new ArrayList<>();
InputStream is = camelCatalog.getVersionManager().getResourceAsStream(DEV_CONSOLE_CATALOG);
if (is != null) {
try {
CatalogHelper.loadLines(is, names);
} catch (IOException e) {
// ignore
}
}
return names;
}

@Override
public List<String> findLanguageNames() {
List<String> names = new ArrayList<>();
Expand All @@ -130,6 +169,20 @@ public List<String> findLanguageNames() {
return names;
}

@Override
public List<String> findTransformerNames() {
List<String> names = new ArrayList<>();
InputStream is = camelCatalog.getVersionManager().getResourceAsStream(TRANSFORMER_CATALOG);
if (is != null) {
try {
CatalogHelper.loadLines(is, names);
} catch (IOException e) {
// ignore
}
}
return names;
}

@Override
public List<String> findOtherNames() {
List<String> names = new ArrayList<>();
Expand All @@ -144,4 +197,29 @@ public List<String> findOtherNames() {
return names;
}

@Override
public List<String> findBeansNames() {
List<String> names = new ArrayList<>();
InputStream is = camelCatalog.getVersionManager().getResourceAsStream(BEANS_CATALOG);
if (is != null) {
try {
CatalogHelper.loadLines(is, names);
} catch (IOException e) {
// ignore
}
}
return names;
}

@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Map<String, String> findCapabilities() {
final Properties properties = new Properties();
try (InputStream is = getCamelCatalog().getVersionManager().getResourceAsStream(CAPABILITIES_CATALOG)) {
properties.load(is);
} catch (IOException e) {
// ignore
}
return new TreeMap<>((Map<String, String>) (Map) properties);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

import org.apache.camel.catalog.CamelCatalog;
import org.apache.camel.catalog.DefaultCamelCatalog;
import org.apache.camel.catalog.Kind;
import org.apache.camel.tooling.model.ArtifactModel;
import org.apache.camel.tooling.model.Kind;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -72,8 +72,8 @@ public void testProviderName() throws Exception {
@Test
public void extensionsPresent() throws Exception {

final Set<String> artifactIdsPresentInCatalog = Stream.of(org.apache.camel.catalog.Kind.values())
.filter(kind -> kind != Kind.eip)
final Set<String> artifactIdsPresentInCatalog = Stream.of(Kind.values())
.filter(kind -> (kind != Kind.eip && kind != Kind.model && kind != Kind.bean))
.flatMap(kind -> catalog.findNames(kind).stream()
.map(name -> catalog.model(kind, name)))
.filter(model -> model instanceof ArtifactModel)
Expand Down Expand Up @@ -152,6 +152,18 @@ public void testFindDataFormatNames() throws Exception {
assertTrue(names.contains("zipFile"));
}

@Test
public void testFindDevConsoleNames() throws Exception {
List<String> names = catalog.findDevConsoleNames();

assertNotNull(names);
assertFalse(names.isEmpty());

assertTrue(names.contains("context"));
assertTrue(names.contains("endpoint"));
assertTrue(names.contains("jvm"));
}

@Test
public void testFindLanguageNames() throws Exception {
List<String> names = catalog.findLanguageNames();
Expand Down Expand Up @@ -183,6 +195,16 @@ public void testFindOtherNames() throws Exception {
assertFalse(names.contains("blueprint"));
}

@Test
public void testFindTransformers() throws Exception {
List<String> names = catalog.findTransformerNames();

assertNotNull(names);
assertFalse(names.isEmpty());

assertTrue(names.contains("azure-storage-blob:application-cloudevents"));
}

@Test
public void testComponentArtifactId() throws Exception {
String json = catalog.componentJSonSchema("salesforce");
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ asciidoc:
requires: "'util=camel-website-util,quarkus=xref:js/quarkus.js'"

# Project versions
camel-version: 4.4.1 # replace ${camel.version}
camel-version: 4.5.0 # replace ${camel.version}
camel-docs-version: 4.4.x
camel-quarkus-version: 3.10.0 # replace ${camel-quarkus.version}
quarkus-version: 3.9.0 # replace ${quarkus.version}
Expand Down
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/coap+tcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-coap
cqArtifactIdBase: coap
cqNativeSupported: false
cqStatus: Preview
cqDeprecated: false
cqJvmSince: 1.1.0
cqNativeSince: n/a
cqCamelPartName: coap+tcp
cqCamelPartTitle: CoAP
cqCamelPartDescription: Send and receive messages to/from COAP capable devices.
cqExtensionPageTitle: CoAP
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/coaps+tcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-coap
cqArtifactIdBase: coap
cqNativeSupported: false
cqStatus: Preview
cqDeprecated: false
cqJvmSince: 1.1.0
cqNativeSince: n/a
cqCamelPartName: coaps+tcp
cqCamelPartTitle: CoAP
cqCamelPartDescription: Send and receive messages to/from COAP capable devices.
cqExtensionPageTitle: CoAP
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/coaps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-coap
cqArtifactIdBase: coap
cqNativeSupported: false
cqStatus: Preview
cqDeprecated: false
cqJvmSince: 1.1.0
cqNativeSince: n/a
cqCamelPartName: coaps
cqCamelPartTitle: CoAP (Secure)
cqCamelPartDescription: Send and receive messages to/from COAP capable devices.
cqExtensionPageTitle: CoAP
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/cometds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-cometd
cqArtifactIdBase: cometd
cqNativeSupported: false
cqStatus: Preview
cqDeprecated: false
cqJvmSince: 1.1.0
cqNativeSince: n/a
cqCamelPartName: cometds
cqCamelPartTitle: CometD (Secure)
cqCamelPartDescription: Offers publish/subscribe, peer-to-peer (via a server), and RPC style messaging using the CometD/Bayeux protocol.
cqExtensionPageTitle: CometD
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/disruptor-vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-disruptor
cqArtifactIdBase: disruptor
cqNativeSupported: true
cqStatus: Stable
cqDeprecated: false
cqJvmSince: 1.1.0
cqNativeSince: 1.2.0
cqCamelPartName: disruptor-vm
cqCamelPartTitle: Disruptor VM
cqCamelPartDescription: Provides asynchronous SEDA behavior using LMAX Disruptor.
cqExtensionPageTitle: Disruptor
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/https.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-http
cqArtifactIdBase: http
cqNativeSupported: true
cqStatus: Stable
cqDeprecated: false
cqJvmSince: 1.0.0
cqNativeSince: 1.0.0
cqCamelPartName: https
cqCamelPartTitle: HTTPS (Secure)
cqCamelPartDescription: Send requests to external HTTP servers using Apache HTTP Client 5.x.
cqExtensionPageTitle: HTTP
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/imaps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-mail
cqArtifactIdBase: mail
cqNativeSupported: true
cqStatus: Stable
cqDeprecated: false
cqJvmSince: 0.2.0
cqNativeSince: 0.2.0
cqCamelPartName: imaps
cqCamelPartTitle: IMAPS (Secure)
cqCamelPartDescription: Send and receive emails using imap, pop3 and smtp protocols.
cqExtensionPageTitle: Mail
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/pop3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-mail
cqArtifactIdBase: mail
cqNativeSupported: true
cqStatus: Stable
cqDeprecated: false
cqJvmSince: 0.2.0
cqNativeSince: 0.2.0
cqCamelPartName: pop3
cqCamelPartTitle: POP3
cqCamelPartDescription: Send and receive emails using imap, pop3 and smtp protocols.
cqExtensionPageTitle: Mail
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/pop3s.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-mail
cqArtifactIdBase: mail
cqNativeSupported: true
cqStatus: Stable
cqDeprecated: false
cqJvmSince: 0.2.0
cqNativeSince: 0.2.0
cqCamelPartName: pop3s
cqCamelPartTitle: POP3S
cqCamelPartDescription: Send and receive emails using imap, pop3 and smtp protocols.
cqExtensionPageTitle: Mail
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/qdrant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-qdrant
cqArtifactIdBase: qdrant
cqNativeSupported: false
cqStatus: Preview
cqDeprecated: false
cqJvmSince: 3.10.0
cqNativeSince: n/a
cqCamelPartName: qdrant
cqCamelPartTitle: Qdrant
cqCamelPartDescription: Perform operations on the Qdrant Vector Database.
cqExtensionPageTitle: Qdrant
2 changes: 1 addition & 1 deletion docs/modules/ROOT/examples/components/rest-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ cqJvmSince: 1.0.0
cqNativeSince: 1.0.0
cqCamelPartName: rest-openapi
cqCamelPartTitle: REST OpenApi
cqCamelPartDescription: Configure REST producers based on an OpenAPI specification document delegating to a component implementing the RestProducerFactory interface.
cqCamelPartDescription: To call REST services using OpenAPI specification as contract.
cqExtensionPageTitle: REST OpenApi
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/smpps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-smpp
cqArtifactIdBase: smpp
cqNativeSupported: false
cqStatus: Preview
cqDeprecated: false
cqJvmSince: 1.1.0
cqNativeSince: n/a
cqCamelPartName: smpps
cqCamelPartTitle: SMPP (Secure)
cqCamelPartDescription: Send and receive SMS messages using a SMSC (Short Message Service Center).
cqExtensionPageTitle: SMPP
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/smtp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-mail
cqArtifactIdBase: mail
cqNativeSupported: true
cqStatus: Stable
cqDeprecated: false
cqJvmSince: 0.2.0
cqNativeSince: 0.2.0
cqCamelPartName: smtp
cqCamelPartTitle: SMTP
cqCamelPartDescription: Send and receive emails using imap, pop3 and smtp protocols.
cqExtensionPageTitle: Mail
13 changes: 13 additions & 0 deletions docs/modules/ROOT/examples/components/smtps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Do not edit directly!
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
cqArtifactId: camel-quarkus-mail
cqArtifactIdBase: mail
cqNativeSupported: true
cqStatus: Stable
cqDeprecated: false
cqJvmSince: 0.2.0
cqNativeSince: 0.2.0
cqCamelPartName: smtps
cqCamelPartTitle: SMTPS
cqCamelPartDescription: Send and receive emails using imap, pop3 and smtp protocols.
cqExtensionPageTitle: Mail
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
*** xref:reference/extensions/jackson-protobuf.adoc[Protobuf Jackson]
*** xref:reference/extensions/pubnub.adoc[PubNub]
*** xref:reference/extensions/pulsar.adoc[Pulsar]
*** xref:reference/extensions/qdrant.adoc[Qdrant]
*** xref:reference/extensions/quartz.adoc[Quartz]
*** xref:reference/extensions/quickfix.adoc[QuickFix]
*** xref:reference/extensions/qute.adoc[Qute]
Expand Down
Loading
Loading