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/11/02 07:13:01 UTC
[camel-kafka-connector] 01/01: Added specific section in
documentation related to archetype
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch archetypes-up
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git
commit afb85261505de3bffff77443ca6bdbf5d04e77a2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 2 08:12:22 2020 +0100
Added specific section in documentation related to archetype
---
docs/modules/ROOT/nav.adoc | 3 +-
.../{archetypes.adoc => archetype-connector.adoc} | 6 +-
docs/modules/ROOT/pages/archetypes.adoc | 173 +--------------------
3 files changed, 6 insertions(+), 176 deletions(-)
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index de8c217..c18d0c7 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -1,7 +1,8 @@
* xref:about.adoc[What is it?]
** xref:basic-concepts.adoc[Basic concepts]
** xref:aggregation.adoc[Aggregation]
-** xref:archetypes.adoc[Archetype]
+* xref:archetypes.adoc[Archetypes]
+** xref:archetype-connector.adoc[Extensible connector archetype]
* xref:getting-started.adoc[Getting started]
** xref:try-it-out-locally.adoc[Try it locally]
** xref:try-it-out-on-kubernetes.adoc[Try it on Kubernetes]
diff --git a/docs/modules/ROOT/pages/archetypes.adoc b/docs/modules/ROOT/pages/archetype-connector.adoc
similarity index 95%
copy from docs/modules/ROOT/pages/archetypes.adoc
copy to docs/modules/ROOT/pages/archetype-connector.adoc
index 711fc82..19d8731 100644
--- a/docs/modules/ROOT/pages/archetypes.adoc
+++ b/docs/modules/ROOT/pages/archetype-connector.adoc
@@ -1,9 +1,7 @@
-[[Archetypes-Archetypes]]
+[[ArchetypeConnector-ArchetypeConnector]]
= Archetypes
-There are scenarios in Camel-Kafka-connector and in the Kafka Connect world in general, where an end users needs to extend a connector by adding, for example, a converter or a transformer (or in the camel-kafka-connector case an aggregator).
-
-In camel-kafka-connector we provide the camel-kafka-connector-extensible-archetype for this purpose.
+In camel-kafka-connector we provide the camel-kafka-connector-extensible-archetype for extending the features of a connector and make it extensible.
You can create a camel-kafka-connector project ready to be extended.
diff --git a/docs/modules/ROOT/pages/archetypes.adoc b/docs/modules/ROOT/pages/archetypes.adoc
index 711fc82..a846502 100644
--- a/docs/modules/ROOT/pages/archetypes.adoc
+++ b/docs/modules/ROOT/pages/archetypes.adoc
@@ -3,177 +3,8 @@
There are scenarios in Camel-Kafka-connector and in the Kafka Connect world in general, where an end users needs to extend a connector by adding, for example, a converter or a transformer (or in the camel-kafka-connector case an aggregator).
-In camel-kafka-connector we provide the camel-kafka-connector-extensible-archetype for this purpose.
+In camel-kafka-connector we provide multiple archetypes for this purpose.
-You can create a camel-kafka-connector project ready to be extended.
+xref:archetype-connector.adoc[Extensible connector archetype]
-You can do that through the following command.
-[source,bash]
-----
-> mvn archetype:generate -DarchetypeGroupId=org.apache.camel.kafkaconnector.archetypes -DarchetypeArtifactId=camel-kafka-connector-extensible-archetype -DarchetypeVersion=0.7.0-SNAPSHOT
-[INFO] Scanning for projects...
-[INFO]
-[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
-[INFO] Building Maven Stub Project (No POM) 1
-[INFO] --------------------------------[ pom ]---------------------------------
-[INFO]
-[INFO] >>> maven-archetype-plugin:3.1.2:generate (default-cli) > generate-sources @ standalone-pom >>>
-[INFO]
-[INFO] <<< maven-archetype-plugin:3.1.2:generate (default-cli) < generate-sources @ standalone-pom <<<
-[INFO]
-[INFO]
-[INFO] --- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---
-[INFO] Generating project in Interactive mode
-[INFO] Archetype repository not defined. Using the one from [org.apache.camel.kafkaconnector.archetypes:camel-kafka-connector-extensible-archetype:0.4.0] found in catalog remote
-Define value for property 'groupId': org.apache.camel.kafkaconnector.extended
-Define value for property 'artifactId': myconnector-extended
-Define value for property 'version' 1.0-SNAPSHOT: :
-Define value for property 'package' org.apache.camel.kafkaconnector.extended: :
-Define value for property 'camel-kafka-connector-name': camel-aws2-s3-kafka-connector
-[INFO] Using property: camel-kafka-connector-version = 0.7.0-SNAPSHOT
-Confirm properties configuration:
-groupId: org.apache.camel.kafkaconnector.extended
-artifactId: myconnector-extended
-version: 1.0-SNAPSHOT
-package: org.apache.camel.kafkaconnector.extended
-camel-kafka-connector-name: camel-aws2-s3-kafka-connector
-camel-kafka-connector-version: 0.7.0-SNAPSHOT
- Y: : Y
-[INFO] ----------------------------------------------------------------------------
-[INFO] Using following parameters for creating project from Archetype: camel-kafka-connector-extensible-archetype:0.7.0-SNAPSHOT
-[INFO] ----------------------------------------------------------------------------
-[INFO] Parameter: groupId, Value: org.apache.camel.kafkaconnector.extended
-[INFO] Parameter: artifactId, Value: myconnector-extended
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: package, Value: org.apache.camel.kafkaconnector.extended
-[INFO] Parameter: packageInPathFormat, Value: org/apache/camel/kafkaconnector/extended
-[INFO] Parameter: package, Value: org.apache.camel.kafkaconnector.extended
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: groupId, Value: org.apache.camel.kafkaconnector.extended
-[INFO] Parameter: camel-kafka-connector-name, Value: camel-aws2-s3-kafka-connector
-[INFO] Parameter: camel-kafka-connector-version, Value: 0.7.0-SNAPSHOT
-[INFO] Parameter: artifactId, Value: myconnector-extended
-[INFO] Project created from Archetype in dir: /home/workspace/myconnector-extended
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 05:44 min
-[INFO] Finished at: 2020-09-04T08:55:00+02:00
-[INFO] ------------------------------------------------------------------------
-----
-
-In the pom of the created project you can add the dependencies you need.
-
-This is the resulting POM
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.kafkaconnector</groupId>
- <artifactId>parent</artifactId>
- <version>0.7.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.camel.kafkaconnector.extended</groupId>
- <artifactId>myconnector-extended</artifactId>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
-
- <name>A Camel Kafka Connector extended</name>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <camel-kafka-connector-version>${project.version}</camel-kafka-connector-version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.kafka</groupId>
- <artifactId>connect-api</artifactId>
- <scope>provided</scope>
- <version>${kafka.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.kafka</groupId>
- <artifactId>connect-transforms</artifactId>
- <scope>provided</scope>
- <version>${kafka.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.kafkaconnector</groupId>
- <artifactId>camel-kafka-connector</artifactId>
- <version>0.7.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.kafkaconnector</groupId>
- <artifactId>camel-aws2-s3-kafka-connector</artifactId>
- <version>0.7.0-SNAPSHOT</version>
- </dependency>
- <!-- Add your optional dependencies here -->
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0-M4</version>
- <configuration>
- <failIfNoTests>false</failIfNoTests>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
- <inherited>true</inherited>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.5.3</version>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/package.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
-----
-
-Now, you are able to add whatever you need in the project, at the end you'll need just to build and you'll get a zipped or tar.gz connector.