You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/10/07 15:07:53 UTC
[camel-kafka-connector] 01/04: Add a Maven Plugin to collect the
connector descriptors for catalog purpose
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git
commit ea2c584b831cec492cea8fb5ad81ca9219aab8d8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Oct 7 15:28:57 2020 +0200
Add a Maven Plugin to collect the connector descriptors for catalog purpose
---
.../resources/descriptors/connectors.properties | 509 +++++++++++++++++++++
connectors/pom.xml | 13 +
.../pom.xml | 121 +++++
.../maven/docs/UpdateDocComponentsListMojo.java | 153 +++++++
.../src/main/resources/META-INF/LICENSE.txt | 203 ++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 +
.../src/main/resources/connectors.mvel | 11 +
tooling/pom.xml | 1 +
8 files changed, 1022 insertions(+)
diff --git a/camel-kafka-connector-catalog/src/generated/resources/descriptors/connectors.properties b/camel-kafka-connector-catalog/src/generated/resources/descriptors/connectors.properties
new file mode 100644
index 0000000..42d9761
--- /dev/null
+++ b/camel-kafka-connector-catalog/src/generated/resources/descriptors/connectors.properties
@@ -0,0 +1,509 @@
+camel-activemq-source
+camel-activemq-sink
+camel-ahc-sink
+camel-ahc-ws-source
+camel-ahc-ws-sink
+camel-ahc-wss-source
+camel-ahc-wss-sink
+camel-amqp-source
+camel-amqp-sink
+camel-apns-source
+camel-apns-sink
+camel-arangodb-sink
+camel-as2-source
+camel-as2-sink
+camel-asterisk-source
+camel-asterisk-sink
+camel-atmos-source
+camel-atmos-sink
+camel-atmosphere-websocket-source
+camel-atmosphere-websocket-sink
+camel-atom-source
+camel-atomix-map-source
+camel-atomix-map-sink
+camel-atomix-messaging-source
+camel-atomix-messaging-sink
+camel-atomix-multimap-sink
+camel-atomix-queue-source
+camel-atomix-queue-sink
+camel-atomix-set-source
+camel-atomix-set-sink
+camel-atomix-value-source
+camel-atomix-value-sink
+camel-avro-source
+camel-avro-sink
+camel-aws-cw-sink
+camel-aws-ddb-sink
+camel-aws-ddbstream-source
+camel-aws-kinesis-firehose-sink
+camel-aws-kinesis-source
+camel-aws-kinesis-sink
+camel-aws-lambda-sink
+camel-aws-s3-source
+camel-aws-s3-sink
+camel-aws-sdb-sink
+camel-aws-ses-sink
+camel-aws-sns-sink
+camel-aws-sqs-source
+camel-aws-sqs-sink
+camel-aws-swf-source
+camel-aws-swf-sink
+camel-aws-translate-sink
+camel-aws2-athena-sink
+camel-aws2-cw-sink
+camel-aws2-ddb-sink
+camel-aws2-ddbstream-source
+camel-aws2-kinesis-firehose-sink
+camel-aws2-kinesis-source
+camel-aws2-kinesis-sink
+camel-aws2-lambda-sink
+camel-aws2-s3-source
+camel-aws2-s3-sink
+camel-aws2-ses-sink
+camel-aws2-sns-sink
+camel-aws2-sqs-source
+camel-aws2-sqs-sink
+camel-aws2-sts-sink
+camel-aws2-translate-sink
+camel-azure-blob-source
+camel-azure-blob-sink
+camel-azure-eventhubs-source
+camel-azure-eventhubs-sink
+camel-azure-queue-source
+camel-azure-queue-sink
+camel-azure-storage-blob-source
+camel-azure-storage-blob-sink
+camel-azure-storage-queue-source
+camel-azure-storage-queue-sink
+camel-bean-sink
+camel-beanstalk-source
+camel-beanstalk-sink
+camel-box-source
+camel-box-sink
+camel-braintree-source
+camel-braintree-sink
+camel-caffeine-cache-sink
+camel-caffeine-loadcache-sink
+camel-chatscript-sink
+camel-chunk-sink
+camel-cm-sms-sink
+camel-cmis-source
+camel-cmis-sink
+camel-coap-source
+camel-coap-sink
+camel-coap-tcp-source
+camel-coap-tcp-sink
+camel-coaps-source
+camel-coaps-sink
+camel-coaps-tcp-source
+camel-coaps-tcp-sink
+camel-cometd-source
+camel-cometd-sink
+camel-cometds-source
+camel-cometds-sink
+camel-consul-source
+camel-consul-sink
+camel-controlbus-sink
+camel-corda-source
+camel-corda-sink
+camel-couchbase-source
+camel-couchbase-sink
+camel-couchdb-source
+camel-couchdb-sink
+camel-cql-source
+camel-cql-sink
+camel-cron-source
+camel-crypto-cms-sink
+camel-crypto-sink
+camel-cxf-source
+camel-cxf-sink
+camel-cxfrs-source
+camel-cxfrs-sink
+camel-dataformat-sink
+camel-direct-source
+camel-direct-sink
+camel-direct-vm-source
+camel-direct-vm-sink
+camel-disruptor-source
+camel-disruptor-sink
+camel-disruptor-vm-source
+camel-disruptor-vm-sink
+camel-djl-sink
+camel-dns-sink
+camel-docker-source
+camel-docker-sink
+camel-dozer-sink
+camel-drill-sink
+camel-dropbox-source
+camel-dropbox-sink
+camel-ehcache-source
+camel-ehcache-sink
+camel-elasticsearch-rest-sink
+camel-elsql-source
+camel-elsql-sink
+camel-etcd-keys-sink
+camel-etcd-stats-source
+camel-etcd-stats-sink
+camel-etcd-watch-source
+camel-exec-sink
+camel-facebook-source
+camel-facebook-sink
+camel-fhir-source
+camel-fhir-sink
+camel-file-source
+camel-file-sink
+camel-file-watch-source
+camel-flatpack-source
+camel-flatpack-sink
+camel-flink-sink
+camel-fop-sink
+camel-freemarker-sink
+camel-ftp-source
+camel-ftp-sink
+camel-ftps-source
+camel-ftps-sink
+camel-ganglia-sink
+camel-geocoder-sink
+camel-git-source
+camel-git-sink
+camel-github-source
+camel-github-sink
+camel-google-bigquery-sink
+camel-google-bigquery-sql-sink
+camel-google-calendar-source
+camel-google-calendar-sink
+camel-google-calendar-stream-source
+camel-google-drive-source
+camel-google-drive-sink
+camel-google-mail-source
+camel-google-mail-sink
+camel-google-mail-stream-source
+camel-google-pubsub-source
+camel-google-pubsub-sink
+camel-google-sheets-source
+camel-google-sheets-sink
+camel-google-sheets-stream-source
+camel-gora-source
+camel-gora-sink
+camel-grape-sink
+camel-graphql-sink
+camel-grpc-source
+camel-grpc-sink
+camel-guava-eventbus-source
+camel-guava-eventbus-sink
+camel-hazelcast-atomicvalue-sink
+camel-hazelcast-instance-source
+camel-hazelcast-list-source
+camel-hazelcast-list-sink
+camel-hazelcast-map-source
+camel-hazelcast-map-sink
+camel-hazelcast-multimap-source
+camel-hazelcast-multimap-sink
+camel-hazelcast-queue-source
+camel-hazelcast-queue-sink
+camel-hazelcast-replicatedmap-source
+camel-hazelcast-replicatedmap-sink
+camel-hazelcast-ringbuffer-sink
+camel-hazelcast-seda-source
+camel-hazelcast-seda-sink
+camel-hazelcast-set-source
+camel-hazelcast-set-sink
+camel-hazelcast-topic-source
+camel-hazelcast-topic-sink
+camel-hbase-source
+camel-hbase-sink
+camel-hdfs-source
+camel-hdfs-sink
+camel-hipchat-source
+camel-hipchat-sink
+camel-http-sink
+camel-https-sink
+camel-iec60870-client-source
+camel-iec60870-client-sink
+camel-iec60870-server-source
+camel-iec60870-server-sink
+camel-ignite-cache-source
+camel-ignite-cache-sink
+camel-ignite-compute-sink
+camel-ignite-events-source
+camel-ignite-idgen-sink
+camel-ignite-messaging-source
+camel-ignite-messaging-sink
+camel-ignite-queue-sink
+camel-ignite-set-sink
+camel-imap-source
+camel-imap-sink
+camel-imaps-source
+camel-imaps-sink
+camel-infinispan-source
+camel-infinispan-sink
+camel-influxdb-sink
+camel-iota-sink
+camel-ipfs-sink
+camel-irc-source
+camel-irc-sink
+camel-ironmq-source
+camel-ironmq-sink
+camel-jbpm-source
+camel-jbpm-sink
+camel-jcache-source
+camel-jcache-sink
+camel-jclouds-source
+camel-jclouds-sink
+camel-jcr-source
+camel-jcr-sink
+camel-jdbc-sink
+camel-jetty-source
+camel-jgroups-source
+camel-jgroups-sink
+camel-jgroups-raft-source
+camel-jgroups-raft-sink
+camel-jing-sink
+camel-jira-source
+camel-jira-sink
+camel-jms-source
+camel-jms-sink
+camel-jmx-source
+camel-jolt-sink
+camel-jooq-source
+camel-jooq-sink
+camel-jpa-source
+camel-jpa-sink
+camel-jslt-sink
+camel-json-validator-sink
+camel-jsonata-sink
+camel-jt400-source
+camel-jt400-sink
+camel-kubernetes-config-maps-sink
+camel-kubernetes-deployments-source
+camel-kubernetes-deployments-sink
+camel-kubernetes-hpa-source
+camel-kubernetes-hpa-sink
+camel-kubernetes-job-source
+camel-kubernetes-job-sink
+camel-kubernetes-namespaces-source
+camel-kubernetes-namespaces-sink
+camel-kubernetes-nodes-source
+camel-kubernetes-nodes-sink
+camel-kubernetes-persistent-volumes-claims-sink
+camel-kubernetes-persistent-volumes-sink
+camel-kubernetes-pods-source
+camel-kubernetes-pods-sink
+camel-kubernetes-replication-controllers-source
+camel-kubernetes-replication-controllers-sink
+camel-kubernetes-resources-quota-sink
+camel-kubernetes-secrets-sink
+camel-kubernetes-service-accounts-sink
+camel-kubernetes-services-source
+camel-kubernetes-services-sink
+camel-kudu-sink
+camel-language-sink
+camel-ldap-sink
+camel-ldif-sink
+camel-log-sink
+camel-lpr-sink
+camel-lucene-sink
+camel-lumberjack-source
+camel-master-source
+camel-metrics-sink
+camel-micrometer-sink
+camel-microprofile-metrics-sink
+camel-milo-client-source
+camel-milo-client-sink
+camel-milo-server-source
+camel-milo-server-sink
+camel-mina-source
+camel-mina-sink
+camel-minio-source
+camel-minio-sink
+camel-mllp-source
+camel-mllp-sink
+camel-mongodb-gridfs-source
+camel-mongodb-gridfs-sink
+camel-mongodb-source
+camel-mongodb-sink
+camel-msv-sink
+camel-mustache-sink
+camel-mvel-sink
+camel-mybatis-bean-sink
+camel-mybatis-source
+camel-mybatis-sink
+camel-nagios-sink
+camel-nats-source
+camel-nats-sink
+camel-netty-http-source
+camel-netty-http-sink
+camel-netty-source
+camel-netty-sink
+camel-nitrite-source
+camel-nitrite-sink
+camel-nsq-source
+camel-nsq-sink
+camel-oaipmh-source
+camel-oaipmh-sink
+camel-olingo2-source
+camel-olingo2-sink
+camel-olingo4-source
+camel-olingo4-sink
+camel-openshift-build-configs-sink
+camel-openshift-builds-sink
+camel-openstack-cinder-sink
+camel-openstack-glance-sink
+camel-openstack-keystone-sink
+camel-openstack-neutron-sink
+camel-openstack-nova-sink
+camel-openstack-swift-sink
+camel-optaplanner-source
+camel-optaplanner-sink
+camel-paho-source
+camel-paho-sink
+camel-pdf-sink
+camel-pg-replication-slot-source
+camel-pgevent-source
+camel-pgevent-sink
+camel-platform-http-source
+camel-pop3-source
+camel-pop3-sink
+camel-pop3s-source
+camel-pop3s-sink
+camel-pubnub-source
+camel-pubnub-sink
+camel-pulsar-source
+camel-pulsar-sink
+camel-quartz-source
+camel-quickfix-source
+camel-quickfix-sink
+camel-rabbitmq-source
+camel-rabbitmq-sink
+camel-reactive-streams-source
+camel-reactive-streams-sink
+camel-rest-api-source
+camel-rest-source
+camel-rest-sink
+camel-rest-openapi-sink
+camel-rest-swagger-sink
+camel-resteasy-source
+camel-resteasy-sink
+camel-rss-source
+camel-saga-sink
+camel-salesforce-source
+camel-salesforce-sink
+camel-sap-netweaver-sink
+camel-scheduler-source
+camel-schematron-sink
+camel-scp-sink
+camel-seda-source
+camel-seda-sink
+camel-service-source
+camel-servicenow-sink
+camel-servlet-source
+camel-sftp-source
+camel-sftp-sink
+camel-sip-source
+camel-sip-sink
+camel-sips-source
+camel-sips-sink
+camel-sjms-batch-source
+camel-sjms-source
+camel-sjms-sink
+camel-sjms2-source
+camel-sjms2-sink
+camel-slack-source
+camel-slack-sink
+camel-smpp-source
+camel-smpp-sink
+camel-smpps-source
+camel-smpps-sink
+camel-smtp-source
+camel-smtp-sink
+camel-smtps-source
+camel-smtps-sink
+camel-snmp-source
+camel-snmp-sink
+camel-solr-sink
+camel-solrCloud-sink
+camel-solrs-sink
+camel-soroush-source
+camel-soroush-sink
+camel-spark-sink
+camel-splunk-hec-sink
+camel-splunk-source
+camel-splunk-sink
+camel-spring-batch-sink
+camel-spring-event-source
+camel-spring-event-sink
+camel-spring-integration-source
+camel-spring-integration-sink
+camel-spring-ldap-sink
+camel-spring-redis-source
+camel-spring-redis-sink
+camel-spring-ws-source
+camel-spring-ws-sink
+camel-sql-source
+camel-sql-sink
+camel-sql-stored-sink
+camel-ssh-source
+camel-ssh-sink
+camel-stax-sink
+camel-stomp-source
+camel-stomp-sink
+camel-stream-source
+camel-stream-sink
+camel-string-template-sink
+camel-stub-source
+camel-stub-sink
+camel-telegram-source
+camel-telegram-sink
+camel-thrift-source
+camel-thrift-sink
+camel-tika-sink
+camel-timer-source
+camel-twilio-source
+camel-twilio-sink
+camel-twitter-directmessage-source
+camel-twitter-directmessage-sink
+camel-twitter-search-source
+camel-twitter-search-sink
+camel-twitter-timeline-source
+camel-twitter-timeline-sink
+camel-undertow-source
+camel-undertow-sink
+camel-validator-sink
+camel-velocity-sink
+camel-vertx-http-sink
+camel-vertx-source
+camel-vertx-sink
+camel-vertx-websocket-source
+camel-vertx-websocket-sink
+camel-vm-source
+camel-vm-sink
+camel-weather-source
+camel-weather-sink
+camel-web3j-source
+camel-web3j-sink
+camel-webhook-source
+camel-websocket-jsr356-source
+camel-websocket-jsr356-sink
+camel-websocket-source
+camel-websocket-sink
+camel-weka-sink
+camel-wordpress-source
+camel-wordpress-sink
+camel-workday-sink
+camel-xchange-sink
+camel-xj-sink
+camel-xmlsecurity-sign-sink
+camel-xmlsecurity-verify-sink
+camel-xmpp-source
+camel-xmpp-sink
+camel-xquery-source
+camel-xquery-sink
+camel-xslt-sink
+camel-xslt-saxon-sink
+camel-yammer-source
+camel-yammer-sink
+camel-zendesk-source
+camel-zendesk-sink
+camel-zookeeper-source
+camel-zookeeper-sink
+camel-zookeeper-master-source
diff --git a/connectors/pom.xml b/connectors/pom.xml
index 17519b2..e876d3b 100644
--- a/connectors/pom.xml
+++ b/connectors/pom.xml
@@ -189,6 +189,19 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.camel.kafkaconnector</groupId>
+ <artifactId>camel-kafka-connector-catalog-descriptor-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>list-descriptor-files</goal>
+ </goals>
+ <phase>process-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/pom.xml b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/pom.xml
new file mode 100644
index 0000000..1e074b0
--- /dev/null
+++ b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/pom.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.camel.kafkaconnector</groupId>
+ <artifactId>tooling</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-kafka-connector-catalog-descriptor-maven-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <name>Camel-Kafka-Connector :: Tooling :: Catalog Descriptor Maven Plugin</name>
+
+ <properties>
+ <maven-version>3.6.3</maven-version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>tooling-parent</artifactId>
+ <version>${camel.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>${maven-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>${maven-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${maven-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>3.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>${maven-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-dependency-tree</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-build-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>${gson-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
+ <!-- logging -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/java/org/apache/camel/kafkaconnector/maven/docs/UpdateDocComponentsListMojo.java b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/java/org/apache/camel/kafkaconnector/maven/docs/UpdateDocComponentsListMojo.java
new file mode 100644
index 0000000..4dfde51
--- /dev/null
+++ b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/java/org/apache/camel/kafkaconnector/maven/docs/UpdateDocComponentsListMojo.java
@@ -0,0 +1,153 @@
+/*
+ * 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.kafkaconnector.maven.docs;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.TreeSet;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.DirectoryFileFilter;
+import org.apache.commons.io.filefilter.RegexFileFilter;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectHelper;
+
+/**
+ * Updates the documentation in: - docs/modules/ROOT/pages/connectors.adoc
+ */
+@Mojo(name = "list-descriptor-files", threadSafe = true)
+public class UpdateDocComponentsListMojo extends AbstractMojo {
+ private static final String SINK_CONNECTOR_LINK_SUFFIX_ADOC = "kafka-sink-connector.adoc[Sink Docs]";
+ private static final String SOURCE_CONNECTOR_LINK_SUFFIX_ADOC = "kafka-source-connector.adoc[Source Docs]";
+ private static final String XREF_CONNECTOR_LINK_PREFIX = "xref:connectors/";
+
+ /**
+ * The maven project.
+ */
+ @Parameter(property = "project", required = true, readonly = true)
+ protected MavenProject project;
+
+ /**
+ * The directory for components catalog
+ */
+ @Parameter(defaultValue = "${project.directory}/../../connectors/")
+ protected File connectorsDir;
+
+ /**
+ * The project directory
+ */
+ @Parameter(defaultValue = "${basedir}/../")
+ protected File projectBaseDir;
+
+
+ /**
+ * The directory for components catalog
+ */
+ @Parameter(defaultValue = "${project.directory}/../../camel-kafka-connector-catalog/src/generated/resources/descriptors")
+ protected File catalogDescriptorDir;
+
+ /**
+ * The maven project.
+ */
+ @Parameter(property = "connectors-project-name", defaultValue = "connectors", readonly = true)
+ protected String connectorsProjectName;
+
+ /**
+ * Maven ProjectHelper.
+ */
+ @Component
+ private MavenProjectHelper projectHelper;
+
+ /**
+ * Execute goal.
+ *
+ * @throws MojoExecutionException execution of the main class or one of the
+ * threads it generated failed.
+ * @throws MojoFailureException something bad happened...
+ */
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ if (!project.getArtifactId().equals(connectorsProjectName)) {
+ getLog().debug("Skipping project " + project.getArtifactId() + " since it is not " + connectorsProjectName + " can be configured with <connectors-project-name> option.");
+ return;
+ }
+ try {
+ executeComponentsReadme();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected void executeComponentsReadme() throws MojoExecutionException, MojoFailureException, IOException {
+
+ if (connectorsDir != null && connectorsDir.isDirectory()) {
+ File[] files = connectorsDir.listFiles();
+ if (files != null) {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < files.length; i++) {
+ File file = files[i];
+ if (file.isDirectory()) {
+ File fileSource = FileUtils.getFile(file, "src/generated/descriptors/connector-source.properties");
+ File fileSink = FileUtils.getFile(file, "src/generated/descriptors/connector-sink.properties");
+ if (fileSource.exists()) {
+ try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(fileSource), "UTF-8"))) {
+ String line = null;
+ while ((line = br.readLine()) != null) {
+ sb.append(line);
+ sb.append(System.lineSeparator());
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ if (fileSink.exists()) {
+ try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(fileSink), "UTF-8"))) {
+ String line = null;
+ while ((line = br.readLine()) != null) {
+ sb.append(line);
+ sb.append(System.lineSeparator());
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ File file = FileUtils.getFile(catalogDescriptorDir, "connectors.properties");
+ file.createNewFile();
+ try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {
+ writer.write(sb.toString());
+ }
+ }
+ }
+ }
+}
diff --git a/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/META-INF/LICENSE.txt b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
diff --git a/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/META-INF/NOTICE.txt b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Camel distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the different LICENSE files present in the licenses directory of
+ this distribution.
diff --git a/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/connectors.mvel b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/connectors.mvel
new file mode 100644
index 0000000..2bb4eb9
--- /dev/null
+++ b/tooling/camel-kafka-connector-catalog-descriptor-maven-plugin/src/main/resources/connectors.mvel
@@ -0,0 +1,11 @@
+@if{!options.isEmpty()}
+
+Number of Camel Kafka connectors: @{options.size}
+
+[width="100%",cols="4,1,1,1,1,1,1",options="header"]
+|===
+| Name | Sink Support | Source Suppport | Sink Docs | Source Docs | Download Zip | Download Tar.gz
+@foreach{row : options}| *@{row.getName()}* | @{row.isSink()} | @{row.isSource()} | @{row.getDocsSink()} | @{row.getDocsSource()} | @{row.getDownloadLinkZip()} | @{row.getDownloadLinkTar()}
+@end{}|===
+
+@end{}
\ No newline at end of file
diff --git a/tooling/pom.xml b/tooling/pom.xml
index 708dbd8..63ef3fc 100644
--- a/tooling/pom.xml
+++ b/tooling/pom.xml
@@ -36,6 +36,7 @@
<module>camel-kafka-connector-model</module>
<module>camel-kafka-connector-generator-maven-plugin</module>
<module>camel-kafka-connector-docs-maven-plugin</module>
+ <module>camel-kafka-connector-catalog-descriptor-maven-plugin</module>
</modules>
<properties>