davsclaus commented on code in PR #26459: URL: https://github.com/apache/camel/pull/26459#discussion_r4015359165
########## core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java: ########## @@ -0,0 +1,889 @@ +/* + * 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. + */ +package org.apache.camel.util; + +import java.util.Collection; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +/** + * Which Camel artifact (Maven artifactId) ships a component, data format, language or built-in bean. + * <p/> + * The runtime cannot tell this on its own: the metadata that knows is in the jar that is missing. So the tables are + * generated from the catalog at build time (like {@link SensitiveUtils}) and used by the error messages that say what + * to add to the classpath when a name cannot be resolved, or which known name was likely meant. + */ +public final class ArtifactUtils { + + // scheme -> artifactId, including alternative schemes + private static final Map<String, String> COMPONENTS = Map.ofEntries( + // Generated by camel build tools - do NOT edit this list! + // COMPONENTS: START + Map.entry("a2a", "camel-a2a"), + Map.entry("activemq", "camel-activemq"), + Map.entry("activemq6", "camel-activemq6"), + Map.entry("ai-resource", "camel-ai-resource"), + Map.entry("ai-tool", "camel-ai-tool"), + Map.entry("alibaba-eventbridge", "camel-alibaba-eventbridge"), + Map.entry("alibaba-fc", "camel-alibaba-fc"), + Map.entry("alibaba-kms", "camel-alibaba-kms"), + Map.entry("alibaba-mns", "camel-alibaba-mns"), + Map.entry("alibaba-oss", "camel-alibaba-oss"), + Map.entry("alibaba-ots", "camel-alibaba-ots"), + Map.entry("alibaba-sls", "camel-alibaba-sls"), + Map.entry("alibaba-sms", "camel-alibaba-sms"), + Map.entry("amqp", "camel-amqp"), + Map.entry("arangodb", "camel-arangodb"), + Map.entry("as2", "camel-as2"), + Map.entry("asterisk", "camel-asterisk"), + Map.entry("atmosphere-websocket", "camel-atmosphere-websocket"), + Map.entry("atom", "camel-atom"), + Map.entry("avro", "camel-avro-rpc"), + Map.entry("aws-bedrock", "camel-aws-bedrock"), + Map.entry("aws-bedrock-agent", "camel-aws-bedrock"), + Map.entry("aws-bedrock-agent-runtime", "camel-aws-bedrock"), + Map.entry("aws-cloudtrail", "camel-aws-cloudtrail"), + Map.entry("aws-config", "camel-aws-config"), + Map.entry("aws-secrets-manager", "camel-aws-secrets-manager"), + Map.entry("aws-security-hub", "camel-aws-security-hub"), + Map.entry("aws2-athena", "camel-aws2-athena"), + Map.entry("aws2-comprehend", "camel-aws2-comprehend"), + Map.entry("aws2-cw", "camel-aws2-cw"), + Map.entry("aws2-ddb", "camel-aws2-ddb"), + Map.entry("aws2-ddbstream", "camel-aws2-ddb"), + Map.entry("aws2-ec2", "camel-aws2-ec2"), + Map.entry("aws2-ecs", "camel-aws2-ecs"), + Map.entry("aws2-eks", "camel-aws2-eks"), + Map.entry("aws2-eventbridge", "camel-aws2-eventbridge"), + Map.entry("aws2-iam", "camel-aws2-iam"), + Map.entry("aws2-kinesis", "camel-aws2-kinesis"), + Map.entry("aws2-kinesis-firehose", "camel-aws2-kinesis"), + Map.entry("aws2-kms", "camel-aws2-kms"), + Map.entry("aws2-lambda", "camel-aws2-lambda"), + Map.entry("aws2-mq", "camel-aws2-mq"), + Map.entry("aws2-msk", "camel-aws2-msk"), + Map.entry("aws2-polly", "camel-aws2-polly"), + Map.entry("aws2-redshift-data", "camel-aws2-redshift"), + Map.entry("aws2-rekognition", "camel-aws2-rekognition"), + Map.entry("aws2-s3", "camel-aws2-s3"), + Map.entry("aws2-s3-vectors", "camel-aws2-s3-vectors"), + Map.entry("aws2-ses", "camel-aws2-ses"), + Map.entry("aws2-sns", "camel-aws2-sns"), + Map.entry("aws2-sqs", "camel-aws2-sqs"), + Map.entry("aws2-step-functions", "camel-aws2-step-functions"), + Map.entry("aws2-sts", "camel-aws2-sts"), + Map.entry("aws2-textract", "camel-aws2-textract"), + Map.entry("aws2-timestream", "camel-aws2-timestream"), + Map.entry("aws2-transcribe", "camel-aws2-transcribe"), + Map.entry("aws2-translate", "camel-aws2-translate"), + Map.entry("azure-cosmosdb", "camel-azure-cosmosdb"), + Map.entry("azure-eventhubs", "camel-azure-eventhubs"), + Map.entry("azure-files", "camel-azure-files"), + Map.entry("azure-functions", "camel-azure-functions"), + Map.entry("azure-key-vault", "camel-azure-key-vault"), + Map.entry("azure-servicebus", "camel-azure-servicebus"), + Map.entry("azure-storage-blob", "camel-azure-storage-blob"), + Map.entry("azure-storage-datalake", "camel-azure-storage-datalake"), + Map.entry("azure-storage-queue", "camel-azure-storage-queue"), + Map.entry("bean", "camel-bean"), + Map.entry("bean-validator", "camel-bean-validator"), + Map.entry("bonita", "camel-bonita"), + Map.entry("box", "camel-box"), + Map.entry("braintree", "camel-braintree"), + Map.entry("browse", "camel-browse"), + Map.entry("caffeine-cache", "camel-caffeine"), + Map.entry("caffeine-loadcache", "camel-caffeine"), + Map.entry("camunda", "camel-camunda"), + Map.entry("chatscript", "camel-chatscript"), + Map.entry("chunk", "camel-chunk"), + Map.entry("class", "camel-bean"), + Map.entry("clickhouse", "camel-clickhouse"), + Map.entry("clickup", "camel-clickup"), + Map.entry("cm-sms", "camel-cm-sms"), + Map.entry("coap", "camel-coap"), + Map.entry("coap+tcp", "camel-coap"), + Map.entry("coaps", "camel-coap"), + Map.entry("coaps+tcp", "camel-coap"), + Map.entry("cometd", "camel-cometd"), + Map.entry("cometds", "camel-cometd"), + Map.entry("consul", "camel-consul"), + Map.entry("controlbus", "camel-controlbus"), + Map.entry("couchbase", "camel-couchbase"), + Map.entry("couchdb", "camel-couchdb"), + Map.entry("cql", "camel-cassandraql"), + Map.entry("cron", "camel-cron"), + Map.entry("crypto", "camel-crypto"), + Map.entry("cxf", "camel-cxf-soap"), + Map.entry("cxfrs", "camel-cxf-rest"), + Map.entry("cyberark-vault", "camel-cyberark-vault"), + Map.entry("dapr", "camel-dapr"), + Map.entry("dataformat", "camel-dataformat"), + Map.entry("dataset", "camel-dataset"), + Map.entry("dataset-test", "camel-dataset"), + Map.entry("debezium-db2", "camel-debezium-db2"), + Map.entry("debezium-mongodb", "camel-debezium-mongodb"), + Map.entry("debezium-mysql", "camel-debezium-mysql"), + Map.entry("debezium-oracle", "camel-debezium-oracle"), + Map.entry("debezium-postgres", "camel-debezium-postgres"), + Map.entry("debezium-sqlserver", "camel-debezium-sqlserver"), + Map.entry("dfdl", "camel-dfdl"), + Map.entry("dhis2", "camel-dhis2"), + Map.entry("direct", "camel-direct"), + Map.entry("disruptor", "camel-disruptor"), + Map.entry("disruptor-vm", "camel-disruptor"), + Map.entry("djl", "camel-djl"), + Map.entry("dns", "camel-dns"), + Map.entry("docker", "camel-docker"), + Map.entry("docling", "camel-docling"), + Map.entry("drill", "camel-drill"), + Map.entry("dropbox", "camel-dropbox"), + Map.entry("duckdb", "camel-duckdb"), + Map.entry("dynamic-router", "camel-dynamic-router"), + Map.entry("dynamic-router-control", "camel-dynamic-router"), + Map.entry("ehcache", "camel-ehcache"), + Map.entry("elasticsearch", "camel-elasticsearch"), + Map.entry("elasticsearch-rest-client", "camel-elasticsearch-rest-client"), + Map.entry("event", "camel-event"), + Map.entry("exec", "camel-exec"), + Map.entry("fhir", "camel-fhir"), + Map.entry("file", "camel-file"), + Map.entry("file-watch", "camel-file-watch"), + Map.entry("flatpack", "camel-flatpack"), + Map.entry("flink", "camel-flink"), + Map.entry("flowable", "camel-flowable"), + Map.entry("fop", "camel-fop"), + Map.entry("freemarker", "camel-freemarker"), + Map.entry("ftp", "camel-ftp"), + Map.entry("ftps", "camel-ftp"), + Map.entry("geocoder", "camel-geocoder"), + Map.entry("git", "camel-git"), + Map.entry("github2", "camel-github2"), + Map.entry("google-bigquery", "camel-google-bigquery"), + Map.entry("google-bigquery-sql", "camel-google-bigquery"), + Map.entry("google-calendar", "camel-google-calendar"), + Map.entry("google-calendar-stream", "camel-google-calendar"), + Map.entry("google-drive", "camel-google-drive"), + Map.entry("google-firestore", "camel-google-firestore"), + Map.entry("google-functions", "camel-google-functions"), + Map.entry("google-mail", "camel-google-mail"), + Map.entry("google-mail-stream", "camel-google-mail"), + Map.entry("google-pubsub", "camel-google-pubsub"), + Map.entry("google-secret-manager", "camel-google-secret-manager"), + Map.entry("google-sheets", "camel-google-sheets"), + Map.entry("google-sheets-stream", "camel-google-sheets"), + Map.entry("google-speech-to-text", "camel-google-speech-to-text"), + Map.entry("google-storage", "camel-google-storage"), + Map.entry("google-text-to-speech", "camel-google-text-to-speech"), + Map.entry("google-vertexai", "camel-google-vertexai"), + Map.entry("google-vision", "camel-google-vision"), + Map.entry("graphql", "camel-graphql"), + Map.entry("grpc", "camel-grpc"), + Map.entry("hashicorp-vault", "camel-hashicorp-vault"), + Map.entry("hazelcast-atomicvalue", "camel-hazelcast"), + Map.entry("hazelcast-instance", "camel-hazelcast"), + Map.entry("hazelcast-list", "camel-hazelcast"), + Map.entry("hazelcast-map", "camel-hazelcast"), + Map.entry("hazelcast-multimap", "camel-hazelcast"), + Map.entry("hazelcast-pncounter", "camel-hazelcast"), + Map.entry("hazelcast-queue", "camel-hazelcast"), + Map.entry("hazelcast-replicatedmap", "camel-hazelcast"), + Map.entry("hazelcast-ringbuffer", "camel-hazelcast"), + Map.entry("hazelcast-seda", "camel-hazelcast"), + Map.entry("hazelcast-set", "camel-hazelcast"), + Map.entry("hazelcast-topic", "camel-hazelcast"), + Map.entry("hivemq", "camel-hivemq"), + Map.entry("http", "camel-http"), + Map.entry("https", "camel-http"), + Map.entry("huggingface", "camel-huggingface"), + Map.entry("hwcloud-dms", "camel-huaweicloud-dms"), + Map.entry("hwcloud-frs", "camel-huaweicloud-frs"), + Map.entry("hwcloud-functiongraph", "camel-huaweicloud-functiongraph"), + Map.entry("hwcloud-iam", "camel-huaweicloud-iam"), + Map.entry("hwcloud-imagerecognition", "camel-huaweicloud-imagerecognition"), + Map.entry("hwcloud-obs", "camel-huaweicloud-obs"), + Map.entry("hwcloud-smn", "camel-huaweicloud-smn"), + Map.entry("ibm-cos", "camel-ibm-cos"), + Map.entry("ibm-secrets-manager", "camel-ibm-secrets-manager"), + Map.entry("ibm-watson-discovery", "camel-ibm-watson-discovery"), + Map.entry("ibm-watson-language", "camel-ibm-watson-language"), + Map.entry("ibm-watson-speech-to-text", "camel-ibm-watson-speech-to-text"), + Map.entry("ibm-watson-text-to-speech", "camel-ibm-watson-text-to-speech"), + Map.entry("ibm-watsonx-ai", "camel-ibm-watsonx-ai"), + Map.entry("ibm-watsonx-data", "camel-ibm-watsonx-data"), + Map.entry("iggy", "camel-iggy"), + Map.entry("ignite-cache", "camel-ignite"), + Map.entry("ignite-compute", "camel-ignite"), + Map.entry("ignite-events", "camel-ignite"), + Map.entry("ignite-idgen", "camel-ignite"), + Map.entry("ignite-messaging", "camel-ignite"), + Map.entry("ignite-queue", "camel-ignite"), + Map.entry("ignite-set", "camel-ignite"), + Map.entry("imap", "camel-mail"), + Map.entry("imaps", "camel-mail"), + Map.entry("infinispan", "camel-infinispan"), + Map.entry("infinispan-embedded", "camel-infinispan-embedded"), + Map.entry("influxdb", "camel-influxdb"), + Map.entry("influxdb2", "camel-influxdb2"), + Map.entry("jcache", "camel-jcache"), + Map.entry("jcr", "camel-jcr"), + Map.entry("jdbc", "camel-jdbc"), + Map.entry("jetty", "camel-jetty"), + Map.entry("jgroups", "camel-jgroups"), + Map.entry("jgroups-raft", "camel-jgroups-raft"), + Map.entry("jira", "camel-jira"), + Map.entry("jms", "camel-jms"), + Map.entry("jmx", "camel-jmx"), + Map.entry("jolt", "camel-jolt"), + Map.entry("jooq", "camel-jooq"), + Map.entry("jpa", "camel-jpa"), + Map.entry("jslt", "camel-jslt"), + Map.entry("json-validator", "camel-json-validator"), + Map.entry("jsonata", "camel-jsonata"), + Map.entry("jt400", "camel-jt400"), + Map.entry("jte", "camel-jte"), + Map.entry("kafka", "camel-kafka"), + Map.entry("kamelet", "camel-kamelet"), + Map.entry("keycloak", "camel-keycloak"), + Map.entry("knative", "camel-knative"), + Map.entry("kserve", "camel-kserve"), + Map.entry("kubernetes-config-maps", "camel-kubernetes"), + Map.entry("kubernetes-cronjob", "camel-kubernetes"), + Map.entry("kubernetes-custom-resources", "camel-kubernetes"), + Map.entry("kubernetes-deployments", "camel-kubernetes"), + Map.entry("kubernetes-events", "camel-kubernetes"), + Map.entry("kubernetes-hpa", "camel-kubernetes"), + Map.entry("kubernetes-job", "camel-kubernetes"), + Map.entry("kubernetes-namespaces", "camel-kubernetes"), + Map.entry("kubernetes-nodes", "camel-kubernetes"), + Map.entry("kubernetes-persistent-volumes", "camel-kubernetes"), + Map.entry("kubernetes-persistent-volumes-claims", "camel-kubernetes"), + Map.entry("kubernetes-pods", "camel-kubernetes"), + Map.entry("kubernetes-replication-controllers", "camel-kubernetes"), + Map.entry("kubernetes-resources-quota", "camel-kubernetes"), + Map.entry("kubernetes-secrets", "camel-kubernetes"), + Map.entry("kubernetes-service-accounts", "camel-kubernetes"), + Map.entry("kubernetes-services", "camel-kubernetes"), + Map.entry("kudu", "camel-kudu"), + Map.entry("langchain4j-agent", "camel-langchain4j-agent"), + Map.entry("langchain4j-chat", "camel-langchain4j-chat"), + Map.entry("langchain4j-embeddings", "camel-langchain4j-embeddings"), + Map.entry("langchain4j-embeddingstore", "camel-langchain4j-embeddingstore"), + Map.entry("langchain4j-ingest", "camel-langchain4j-ingest"), + Map.entry("langchain4j-web-search", "camel-langchain4j-web-search"), + Map.entry("language", "camel-language"), + Map.entry("ldap", "camel-ldap"), + Map.entry("ldif", "camel-ldif"), + Map.entry("log", "camel-log"), + Map.entry("lpr", "camel-printer"), + Map.entry("lucene", "camel-lucene"), + Map.entry("lumberjack", "camel-lumberjack"), + Map.entry("mapstruct", "camel-mapstruct"), + Map.entry("master", "camel-master"), + Map.entry("metrics", "camel-metrics"), + Map.entry("micrometer", "camel-micrometer"), + Map.entry("milo-browse", "camel-milo"), + Map.entry("milo-client", "camel-milo"), + Map.entry("milo-server", "camel-milo"), + Map.entry("milvus", "camel-milvus"), + Map.entry("mina", "camel-mina"), + Map.entry("mina-sftp", "camel-mina-sftp"), + Map.entry("minio", "camel-minio"), + Map.entry("mllp", "camel-mllp"), + Map.entry("mock", "camel-mock"), + Map.entry("mongodb", "camel-mongodb"), + Map.entry("mongodb-gridfs", "camel-mongodb-gridfs"), + Map.entry("mustache", "camel-mustache"), + Map.entry("mvel", "camel-mvel"), + Map.entry("mybatis", "camel-mybatis"), + Map.entry("mybatis-bean", "camel-mybatis"), + Map.entry("nats", "camel-nats"), + Map.entry("neo4j", "camel-neo4j"), + Map.entry("netty", "camel-netty"), + Map.entry("netty-http", "camel-netty-http"), + Map.entry("oaipmh", "camel-oaipmh"), + Map.entry("olingo2", "camel-olingo2"), + Map.entry("olingo4", "camel-olingo4"), + Map.entry("once", "camel-once"), + Map.entry("opa", "camel-opa"), + Map.entry("openai", "camel-openai"), + Map.entry("opensearch", "camel-opensearch"), + Map.entry("openshift-build-configs", "camel-kubernetes"), + Map.entry("openshift-builds", "camel-kubernetes"), + Map.entry("openshift-deploymentconfigs", "camel-kubernetes"), + Map.entry("openstack-cinder", "camel-openstack"), + Map.entry("openstack-glance", "camel-openstack"), + Map.entry("openstack-keystone", "camel-openstack"), + Map.entry("openstack-neutron", "camel-openstack"), + Map.entry("openstack-nova", "camel-openstack"), + Map.entry("openstack-swift", "camel-openstack"), + Map.entry("opentelemetry-metrics", "camel-opentelemetry-metrics"), + Map.entry("optaplanner", "camel-optaplanner"), + Map.entry("paho", "camel-paho"), + Map.entry("paho-mqtt5", "camel-paho-mqtt5"), + Map.entry("pdf", "camel-pdf"), + Map.entry("pg-replication-slot", "camel-pg-replication-slot"), + Map.entry("pgevent", "camel-pgevent"), + Map.entry("pgvector", "camel-pgvector"), + Map.entry("pinecone", "camel-pinecone"), + Map.entry("platform-http", "camel-platform-http"), + Map.entry("plc4x", "camel-plc4x"), + Map.entry("pop3", "camel-mail"), + Map.entry("pop3s", "camel-mail"), + Map.entry("pqc", "camel-pqc"), + Map.entry("pubnub", "camel-pubnub"), + Map.entry("pulsar", "camel-pulsar"), + Map.entry("qdrant", "camel-qdrant"), + Map.entry("quartz", "camel-quartz"), + Map.entry("quickfix", "camel-quickfix"), + Map.entry("reactive-streams", "camel-reactive-streams"), + Map.entry("ref", "camel-ref"), + Map.entry("rest", "camel-rest"), + Map.entry("rest-api", "camel-rest"), + Map.entry("rest-openapi", "camel-rest-openapi"), + Map.entry("rest-postman", "camel-rest-postman"), + Map.entry("robotframework", "camel-robotframework"), + Map.entry("rocketmq", "camel-rocketmq"), + Map.entry("rss", "camel-rss"), + Map.entry("saga", "camel-saga"), + Map.entry("salesforce", "camel-salesforce"), + Map.entry("sap-netweaver", "camel-sap-netweaver"), + Map.entry("scheduler", "camel-scheduler"), + Map.entry("schematron", "camel-schematron"), + Map.entry("scp", "camel-jsch"), + Map.entry("seda", "camel-seda"), + Map.entry("servicenow", "camel-servicenow"), + Map.entry("servlet", "camel-servlet"), + Map.entry("sftp", "camel-ftp"), + Map.entry("shell", "camel-shell"), + Map.entry("sjms", "camel-sjms"), + Map.entry("sjms2", "camel-sjms2"), + Map.entry("slack", "camel-slack"), + Map.entry("smb", "camel-smb"), + Map.entry("smooks", "camel-smooks"), + Map.entry("smpp", "camel-smpp"), + Map.entry("smpps", "camel-smpp"), + Map.entry("smtp", "camel-mail"), + Map.entry("smtps", "camel-mail"), + Map.entry("snmp", "camel-snmp"), + Map.entry("solr", "camel-solr"), + Map.entry("spiffe", "camel-spiffe"), + Map.entry("splunk-hec", "camel-splunk-hec"), + Map.entry("spring-ai-chat", "camel-spring-ai-chat"), + Map.entry("spring-ai-embeddings", "camel-spring-ai-embeddings"), + Map.entry("spring-ai-image", "camel-spring-ai-image"), + Map.entry("spring-ai-vector-store", "camel-spring-ai-vector-store"), + Map.entry("spring-batch", "camel-spring-batch"), + Map.entry("spring-event", "camel-spring"), + Map.entry("spring-jdbc", "camel-spring-jdbc"), + Map.entry("spring-ldap", "camel-spring-ldap"), + Map.entry("spring-rabbitmq", "camel-spring-rabbitmq"), + Map.entry("spring-redis", "camel-spring-redis"), + Map.entry("spring-ws", "camel-spring-ws"), + Map.entry("sql", "camel-sql"), + Map.entry("sql-stored", "camel-sql"), + Map.entry("ssh", "camel-ssh"), + Map.entry("state-store", "camel-state-store"), + Map.entry("stax", "camel-stax"), + Map.entry("stitch", "camel-stitch"), + Map.entry("stream", "camel-stream"), + Map.entry("string-template", "camel-stringtemplate"), + Map.entry("stripe", "camel-stripe"), + Map.entry("stub", "camel-stub"), + Map.entry("tahu-edge", "camel-tahu"), + Map.entry("tahu-host", "camel-tahu"), + Map.entry("telegram", "camel-telegram"), + Map.entry("tensorflow-serving", "camel-tensorflow-serving"), + Map.entry("thrift", "camel-thrift"), + Map.entry("thymeleaf", "camel-thymeleaf"), + Map.entry("tika", "camel-tika"), + Map.entry("timer", "camel-timer"), + Map.entry("twilio", "camel-twilio"), + Map.entry("twitter-directmessage", "camel-twitter"), + Map.entry("twitter-search", "camel-twitter"), + Map.entry("twitter-timeline", "camel-twitter"), + Map.entry("undertow", "camel-undertow"), + Map.entry("validator", "camel-validator"), + Map.entry("velocity", "camel-velocity"), + Map.entry("vertx", "camel-vertx"), + Map.entry("vertx-http", "camel-vertx-http"), + Map.entry("vertx-websocket", "camel-vertx-websocket"), + Map.entry("wasm", "camel-wasm"), + Map.entry("weather", "camel-weather"), + Map.entry("weaviate", "camel-weaviate"), + Map.entry("web3j", "camel-web3j"), + Map.entry("webhook", "camel-webhook"), + Map.entry("whatsapp", "camel-whatsapp"), + Map.entry("wordpress", "camel-wordpress"), + Map.entry("workday", "camel-workday"), + Map.entry("xchange", "camel-xchange"), + Map.entry("xj", "camel-xj"), + Map.entry("xmlsecurity-sign", "camel-xmlsecurity"), + Map.entry("xmlsecurity-verify", "camel-xmlsecurity"), + Map.entry("xmpp", "camel-xmpp"), + Map.entry("xquery", "camel-saxon"), + Map.entry("xslt", "camel-xslt"), + Map.entry("xslt-saxon", "camel-xslt-saxon"), + Map.entry("zendesk", "camel-zendesk"), + Map.entry("zookeeper", "camel-zookeeper"), + Map.entry("zookeeper-master", "camel-zookeeper-master") + // COMPONENTS: END + ); + + // name -> artifactId + private static final Map<String, String> LANGUAGES = Map.ofEntries( + // Generated by camel build tools - do NOT edit this list! + // LANGUAGES: START + Map.entry("bean", "camel-bean"), + Map.entry("constant", "camel-core-languages"), + Map.entry("datasonnet", "camel-datasonnet"), + Map.entry("exchangeProperty", "camel-core-languages"), + Map.entry("file", "camel-core-languages"), + Map.entry("groovy", "camel-groovy"), + Map.entry("header", "camel-core-languages"), + Map.entry("hl7terser", "camel-hl7"), + Map.entry("jactl", "camel-jactl"), + Map.entry("java", "camel-joor"), + Map.entry("joor", "camel-joor"), + Map.entry("jq", "camel-jq"), + Map.entry("js", "camel-javascript"), + Map.entry("jsonpath", "camel-jsonpath"), + Map.entry("mvel", "camel-mvel"), + Map.entry("ognl", "camel-ognl"), + Map.entry("python", "camel-python"), + Map.entry("python3", "camel-python3"), + Map.entry("quickjs", "camel-quickjs"), + Map.entry("ref", "camel-core-languages"), + Map.entry("simple", "camel-core-languages"), + Map.entry("spel", "camel-spring"), + Map.entry("tokenize", "camel-core-languages"), + Map.entry("variable", "camel-core-languages"), + Map.entry("wasm", "camel-wasm"), + Map.entry("xpath", "camel-xpath"), + Map.entry("xquery", "camel-saxon"), + Map.entry("xtokenize", "camel-stax") + // LANGUAGES: END + ); + + // name -> artifactId + private static final Map<String, String> DATAFORMATS = Map.ofEntries( + // Generated by camel build tools - do NOT edit this list! + // DATAFORMATS: START + Map.entry("asn1", "camel-asn1"), + Map.entry("avro", "camel-avro"), + Map.entry("avroJackson", "camel-jackson-avro"), + Map.entry("barcode", "camel-barcode"), + Map.entry("base64", "camel-base64"), + Map.entry("beanio", "camel-beanio"), + Map.entry("bindyCsv", "camel-bindy"), + Map.entry("bindyFixed", "camel-bindy"), + Map.entry("bindyKvp", "camel-bindy"), + Map.entry("cbor", "camel-cbor"), + Map.entry("crypto", "camel-crypto"), + Map.entry("csv", "camel-csv"), + Map.entry("dfdl", "camel-dfdl"), + Map.entry("fastjson", "camel-fastjson"), + Map.entry("fhirJson", "camel-fhir"), + Map.entry("fhirXml", "camel-fhir"), + Map.entry("flatpack", "camel-flatpack"), + Map.entry("fory", "camel-fory"), + Map.entry("grok", "camel-grok"), + Map.entry("groovyJson", "camel-groovy"), + Map.entry("groovyXml", "camel-groovy"), + Map.entry("gson", "camel-gson"), + Map.entry("gzipDeflater", "camel-zip-deflater"), + Map.entry("hl7", "camel-hl7"), + Map.entry("ical", "camel-ical"), + Map.entry("iso8583", "camel-iso8583"), + Map.entry("jackson", "camel-jackson"), + Map.entry("jacksonXml", "camel-jacksonxml"), + Map.entry("jaxb", "camel-jaxb"), + Map.entry("jsonApi", "camel-jsonapi"), + Map.entry("jsonb", "camel-jsonb"), + Map.entry("lzf", "camel-lzf"), + Map.entry("mimeMultipart", "camel-mail"), + Map.entry("ocsf", "camel-ocsf"), + Map.entry("parquetAvro", "camel-parquet-avro"), + Map.entry("pgp", "camel-crypto-pgp"), + Map.entry("pqc", "camel-pqc"), + Map.entry("protobuf", "camel-protobuf"), + Map.entry("protobufJackson", "camel-jackson-protobuf"), + Map.entry("rss", "camel-rss"), + Map.entry("smooks", "camel-smooks"), + Map.entry("snakeYaml", "camel-snakeyaml"), + Map.entry("soap", "camel-soap"), + Map.entry("swiftMt", "camel-swift"), + Map.entry("swiftMx", "camel-swift"), + Map.entry("syslog", "camel-syslog"), + Map.entry("tarFile", "camel-tarfile"), + Map.entry("thrift", "camel-thrift"), + Map.entry("toon", "camel-toon"), + Map.entry("ubl", "camel-ubl"), + Map.entry("univocityCsv", "camel-univocity-parsers"), + Map.entry("univocityFixed", "camel-univocity-parsers"), + Map.entry("univocityTsv", "camel-univocity-parsers"), + Map.entry("xmlSecurity", "camel-xmlsecurity"), + Map.entry("zipDeflater", "camel-zip-deflater"), + Map.entry("zipFile", "camel-zipfile") + // DATAFORMATS: END + ); + + // simple class name -> javaType|interfaceType|artifactId + private static final Map<String, String> BEANS = Map.ofEntries( + // Generated by camel build tools - do NOT edit this list! + // BEANS: START + Map.entry("AcceptAllHeaderFilterStrategy", + "org.apache.camel.support.AcceptAllHeaderFilterStrategy|org.apache.camel.spi.HeaderFilterStrategy|camel-support"), + Map.entry("CaffeineAggregationRepository", + "org.apache.camel.component.caffeine.processor.aggregate.CaffeineAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-caffeine"), + Map.entry("CaffeineIdempotentRepository", + "org.apache.camel.component.caffeine.processor.idempotent.CaffeineIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-caffeine"), + Map.entry("CaffeineKeyValueRepository", + "org.apache.camel.component.caffeine.processor.CaffeineKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-caffeine"), + Map.entry("CassandraAggregationRepository", + "org.apache.camel.processor.aggregate.cassandra.CassandraAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-cassandraql"), + Map.entry("CassandraIdempotentRepository", + "org.apache.camel.processor.idempotent.cassandra.CassandraIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-cassandraql"), + Map.entry("CassandraKeyValueRepository", + "org.apache.camel.processor.keyvalue.cassandra.CassandraKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-cassandraql"), + Map.entry("ConsulClusterService", + "org.apache.camel.component.consul.cluster.ConsulClusterService|org.apache.camel.cluster.CamelClusterService|camel-consul"), + Map.entry("CronScheduledRoutePolicy", + "org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy|org.apache.camel.spi.RoutePolicy|camel-quartz"), + Map.entry("DefaultHeaderFilterStrategy", + "org.apache.camel.support.DefaultHeaderFilterStrategy|org.apache.camel.spi.HeaderFilterStrategy|camel-support"), + Map.entry("DurationRoutePolicy", + "org.apache.camel.impl.engine.DurationRoutePolicy|org.apache.camel.spi.RoutePolicy|camel-base-engine"), + Map.entry("DurationRoutePolicyFactory", + "org.apache.camel.impl.engine.DurationRoutePolicyFactory|org.apache.camel.spi.RoutePolicyFactory|camel-base-engine"), + Map.entry("EhcacheAggregationRepository", + "org.apache.camel.component.ehcache.processor.aggregate.EhcacheAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-ehcache"), + Map.entry("EhcacheIdempotentRepository", + "org.apache.camel.component.ehcache.processor.idempotent.EhcacheIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-ehcache"), + Map.entry("EhcacheKeyValueRepository", + "org.apache.camel.component.ehcache.processor.EhcacheKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-ehcache"), + Map.entry("ElasticsearchBulkRequestAggregationStrategy", + "org.apache.camel.component.es.aggregation.ElasticsearchBulkRequestAggregationStrategy|org.apache.camel.AggregationStrategy|camel-elasticsearch"), + Map.entry("FileIdempotentRepository", + "org.apache.camel.support.processor.idempotent.FileIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-support"), + Map.entry("FileLockClusterService", + "org.apache.camel.component.file.cluster.FileLockClusterService|org.apache.camel.cluster.CamelClusterService|camel-file"), + Map.entry("GroupedBodyAggregationStrategy", + "org.apache.camel.processor.aggregate.GroupedBodyAggregationStrategy|org.apache.camel.AggregationStrategy|camel-core-processor"), + Map.entry("GroupedExchangeAggregationStrategy", + "org.apache.camel.processor.aggregate.GroupedExchangeAggregationStrategy|org.apache.camel.AggregationStrategy|camel-core-processor"), + Map.entry("GroupedMessageAggregationStrategy", + "org.apache.camel.processor.aggregate.GroupedMessageAggregationStrategy|org.apache.camel.AggregationStrategy|camel-core-processor"), + Map.entry("HazelcastAggregationRepository", + "org.apache.camel.processor.aggregate.hazelcast.HazelcastAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-hazelcast"), + Map.entry("HazelcastIdempotentRepository", + "org.apache.camel.processor.idempotent.hazelcast.HazelcastIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-hazelcast"), + Map.entry("HazelcastKeyValueRepository", + "org.apache.camel.component.hazelcast.HazelcastKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-hazelcast"), + Map.entry("InfinispanEmbeddedAggregationRepository", + "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-infinispan-embedded"), + Map.entry("InfinispanEmbeddedClusterService", + "org.apache.camel.component.infinispan.embedded.cluster.InfinispanEmbeddedClusterService|org.apache.camel.cluster.CamelClusterService|camel-infinispan-embedded"), + Map.entry("InfinispanEmbeddedIdempotentRepository", + "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-infinispan-embedded"), + Map.entry("InfinispanRemoteAggregationRepository", + "org.apache.camel.component.infinispan.remote.InfinispanRemoteAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-infinispan"), + Map.entry("InfinispanRemoteClusterService", + "org.apache.camel.component.infinispan.remote.cluster.InfinispanRemoteClusterService|org.apache.camel.cluster.CamelClusterService|camel-infinispan"), + Map.entry("InfinispanRemoteIdempotentRepository", + "org.apache.camel.component.infinispan.remote.InfinispanRemoteIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-infinispan"), + Map.entry("InfinispanRemoteKeyValueRepository", + "org.apache.camel.component.infinispan.remote.InfinispanRemoteKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-infinispan"), + Map.entry("JCacheAggregationRepository", + "org.apache.camel.component.jcache.processor.aggregate.JCacheAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-jcache"), + Map.entry("JCacheIdempotentRepository", + "org.apache.camel.component.jcache.processor.idempotent.JCacheIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-jcache"), + Map.entry("JCacheKeyValueRepository", + "org.apache.camel.component.jcache.processor.JCacheKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-jcache"), + Map.entry("JGroupsRaftClusterService", + "org.apache.camel.component.jgroups.raft.cluster.JGroupsRaftClusterService|org.apache.camel.cluster.CamelClusterService|camel-jgroups-raft"), + Map.entry("JdbcAggregationRepository", + "org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-sql"), + Map.entry("JdbcKeyValueRepository", + "org.apache.camel.processor.keyvalue.jdbc.JdbcKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-sql"), + Map.entry("JdbcMessageIdRepository", + "org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository|org.apache.camel.spi.IdempotentRepository|camel-sql"), + Map.entry("JpaKeyValueRepository", + "org.apache.camel.processor.keyvalue.jpa.JpaKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-jpa"), + Map.entry("KafkaIdempotentRepository", + "org.apache.camel.processor.idempotent.kafka.KafkaIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-kafka"), + Map.entry("KafkaKeyValueRepository", + "org.apache.camel.processor.keyvalue.kafka.KafkaKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-kafka"), + Map.entry("KeyValueAggregationRepository", + "org.apache.camel.support.KeyValueAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-support"), + Map.entry("KeyValueIdempotentRepository", + "org.apache.camel.support.KeyValueIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-support"), + Map.entry("KubernetesClusterService", + "org.apache.camel.component.kubernetes.cluster.KubernetesClusterService|org.apache.camel.cluster.CamelClusterService|camel-kubernetes"), + Map.entry("LoggingHttpActivityListener", + "org.apache.camel.component.http.LoggingHttpActivityListener|org.apache.camel.component.http.HttpActivityListener|camel-http"), + Map.entry("MemoryAggregationRepository", + "org.apache.camel.processor.aggregate.MemoryAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-core-processor"), + Map.entry("MemoryIdempotentRepository", + "org.apache.camel.support.processor.idempotent.MemoryIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-support"), + Map.entry("MemoryKeyValueRepository", + "org.apache.camel.support.MemoryKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-support"), + Map.entry("MongoDbIdempotentRepository", + "org.apache.camel.component.mongodb.processor.idempotent.MongoDbIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-mongodb"), + Map.entry("OpensearchBulkRequestAggregationStrategy", + "org.apache.camel.component.opensearch.aggregation.OpensearchBulkRequestAggregationStrategy|org.apache.camel.AggregationStrategy|camel-opensearch"), + Map.entry("RedisAggregationRepository", + "org.apache.camel.component.redis.processor.aggregate.RedisAggregationRepository|org.apache.camel.spi.AggregationRepository|camel-redis"), + Map.entry("RedisKeyValueRepository", + "org.apache.camel.component.redis.RedisKeyValueRepository|org.apache.camel.spi.KeyValueRepository|camel-redis"), + Map.entry("SimpleScheduledRoutePolicy", + "org.apache.camel.routepolicy.quartz.SimpleScheduledRoutePolicy|org.apache.camel.spi.RoutePolicy|camel-quartz"), + Map.entry("SpringCacheIdempotentRepository", + "org.apache.camel.spring.processor.idempotent.SpringCacheIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-spring"), + Map.entry("SpringRedisIdempotentRepository", + "org.apache.camel.component.redis.processor.idempotent.SpringRedisIdempotentRepository|org.apache.camel.spi.IdempotentRepository|camel-spring-redis"), + Map.entry("StringAggregationStrategy", + "org.apache.camel.processor.aggregate.StringAggregationStrategy|org.apache.camel.AggregationStrategy|camel-core-processor"), + Map.entry("TarAggregationStrategy", + "org.apache.camel.processor.aggregate.tarfile.TarAggregationStrategy|org.apache.camel.AggregationStrategy|camel-tarfile"), + Map.entry("ThrottlingExceptionRoutePolicy", + "org.apache.camel.throttling.ThrottlingExceptionRoutePolicy|org.apache.camel.spi.RoutePolicy|camel-support"), + Map.entry("ThrottlingInflightRoutePolicy", + "org.apache.camel.throttling.ThrottlingInflightRoutePolicy|org.apache.camel.spi.RoutePolicy|camel-support"), + Map.entry("UseLatestAggregationStrategy", + "org.apache.camel.processor.aggregate.UseLatestAggregationStrategy|org.apache.camel.AggregationStrategy|camel-core-processor"), + Map.entry("UseOriginalAggregationStrategy", + "org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy|org.apache.camel.AggregationStrategy|camel-core-processor"), + Map.entry("XsltAggregationStrategy", + "org.apache.camel.component.xslt.XsltAggregationStrategy|org.apache.camel.AggregationStrategy|camel-xslt"), + Map.entry("XsltSaxonAggregationStrategy", + "org.apache.camel.component.xslt.saxon.XsltSaxonAggregationStrategy|org.apache.camel.AggregationStrategy|camel-xslt-saxon"), + Map.entry("ZipAggregationStrategy", + "org.apache.camel.processor.aggregate.zipfile.ZipAggregationStrategy|org.apache.camel.AggregationStrategy|camel-zipfile"), + Map.entry("ZooKeeperClusterService", + "org.apache.camel.component.zookeeper.cluster.ZooKeeperClusterService|org.apache.camel.cluster.CamelClusterService|camel-zookeeper") + // BEANS: END + ); + + private ArtifactUtils() { + } + + /** The artifactId of the component with the given scheme, or null if it is not a built-in Camel component. */ + public static String componentArtifact(String scheme) { + return scheme != null ? COMPONENTS.get(scheme) : null; + } + + /** The artifactId of the language with the given name, or null if it is not a built-in Camel language. */ + public static String languageArtifact(String name) { + return name != null ? LANGUAGES.get(name) : null; + } + + /** The artifactId of the data format with the given name, or null if it is not a built-in Camel data format. */ + public static String dataFormatArtifact(String name) { + return name != null ? DATAFORMATS.get(name) : null; + } + + /** The artifactId of the built-in bean with the given simple class name, or null if there is none. */ + public static String beanArtifact(String name) { + return beanField(name, 2); + } + + /** The fully qualified class name of the built-in bean with the given simple class name, or null. */ + public static String beanJavaType(String name) { + return beanField(name, 0); + } + + /** The interface the built-in bean with the given simple class name implements, or null. */ + public static String beanInterface(String name) { + return beanField(name, 1); + } + + private static String beanField(String name, int index) { + String value = name != null ? BEANS.get(name) : null; + if (value == null) { + return null; + } + String[] parts = value.split("\\|", -1); + return parts[index].isEmpty() ? null : parts[index]; + } + + /** The schemes of all built-in components, including alternative schemes. */ + public static Set<String> componentNames() { + return COMPONENTS.keySet(); + } + + /** The names of all built-in languages. */ + public static Set<String> languageNames() { + return LANGUAGES.keySet(); + } + + /** The names of all built-in data formats. */ + public static Set<String> dataFormatNames() { + return DATAFORMATS.keySet(); + } + + /** The simple class names of all built-in beans. */ + public static Set<String> beanNames() { + return BEANS.keySet(); + } + + /** + * What to add to the classpath for the artifact: the plain artifactId, which is what the runtime knows. The Spring + * Boot starter (artifactId-starter) and Quarkus extension (camel-quarkus-name) are a convention for the tooling + * that can check they exist, as camel-jbang export does; not every artifact has one. A core artifact is noted as + * part of camel-core. + */ + public static String dependencyHint(String artifactId) { Review Comment: Applied in 2b35a444c614 — `dependencyHint` returns `""` for a null or blank artifactId, with two test cases. _Claude Code on behalf of davsclaus_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
