Skip to content
Permalink
Browse files
Related to #423 : switched to generate kamelets connectors
  • Loading branch information
valdar committed Oct 25, 2021
1 parent c9f275d commit fd5d7263bddcd010aa3b982aaf9b1d2b73506c48
Showing 6 changed files with 144 additions and 5 deletions.
@@ -0,0 +1,29 @@
## ---------------------------------------------------------------------------
## 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.
## ---------------------------------------------------------------------------

# This file contains additional dependencies needed by camel components packaged as kafka connectors
# Use comma-separated values to include multiple dependencies

# Global dependencies included in all modules (except the ones in the list)
global=org.apache.camel.kafkaconnector:camel-kafka-connector

camel-couchbase=com.couchbase.client:java-client::runtime

# we add a default connection factory maven variables can be used as ${varname}
camel-sjms2=org.apache.activemq:activemq-client::runtime,org.apache.activemq:artemis-jms-client::runtime
exclude_camel-sjms2=
additional_properties_camel-sjms2=camel.component.sjms2.connection-factory=#class:org.apache.activemq.ActiveMQConnectionFactory,camel.component.sjms2.connection-factory.brokerURL=tcp://localhost:61616
@@ -94,12 +94,15 @@
<!-- WARNING: you may lose some changes done to the pom. -->
<!-- <overridePomFile>false</overridePomFile> -->
<initialPomTemplate>${project.basedir}/template-connector-pom.xml</initialPomTemplate>
<initialKameletPomTemplate>${project.basedir}/template-connecotr-kamelet-pom.xml</initialKameletPomTemplate>
<noticeTemplate>${project.basedir}/camel-kafka-connector-NOTICE.txt</noticeTemplate>
<licenseTemplate>${project.basedir}/camel-kafka-connector-LICENSE.txt</licenseTemplate>
<fixDependenciesProperties>${project.basedir}/camel-kafka-connector-fix-dependencies.properties</fixDependenciesProperties>
<fixKameletDependenciesProperties>${project.basedir}/camel-kafka-connector-kamelet-fix-dependencies.properties</fixKameletDependenciesProperties>
<packageFileTemplate>${project.basedir}/template-connector-package.xml</packageFileTemplate>
<exampleSourcePropertiesFileTemplate>${project.basedir}/camel-kafka-connector-template-example-source-properties.template</exampleSourcePropertiesFileTemplate>
<exampleSinkPropertiesFileTemplate>${project.basedir}/camel-kafka-connector-template-example-sink-properties.template</exampleSinkPropertiesFileTemplate>
<removeMissingComponents>true</removeMissingComponents>
<excludedComponents>
<param>bonita</param>
<param>bean-validator</param>
@@ -132,6 +135,11 @@
<artifactId>camel-catalog</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel.kamelets</groupId>
<artifactId>camel-kamelets-catalog</artifactId>
<version>${camel.kamelet.catalog.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
@@ -0,0 +1,105 @@
<?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>connectors</artifactId>
<version>${version}</version>
</parent>

<artifactId>camel-${componentSanitizedName}-kafka-connector</artifactId>
<name>Camel-Kafka-Connector :: ${componentName}</name>
<description>Camel Kafka Connector for ${componentDescription}</description>

<dependencies>
<!-- Kafka -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-transforms</artifactId>
<scope>provided</scope>
</dependency>

<!-- Camel -->
<!--START OF GENERATED CODE-->
<!--END OF GENERATED CODE-->
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version><#noparse>${version.maven.surefire.plugin}</#noparse></version>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version><#noparse>${version.maven.jar}</#noparse></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>3.3.0</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>
@@ -43,7 +43,6 @@
import org.apache.kafka.connect.source.SourceTask;
import org.jctools.queues.MessagePassingQueue;
import org.jctools.queues.SpscArrayQueue;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@@ -34,7 +34,7 @@

@Mojo(name = "camel-kafka-connector-delete", threadSafe = true,
defaultPhase = LifecyclePhase.GENERATE_RESOURCES)
public class CamelKafkaConnectorDeleteMojo extends AbstractCamelComponentKafkaConnectorMojo {
public class CamelKafkaConnectorDeleteMojo extends AbstractCamelKafkaConnectorMojo {

@Parameter(property = "name", required = true)
protected String name;
@@ -29,8 +29,6 @@

import com.soebes.itf.jupiter.extension.MavenGoal;
import com.soebes.itf.jupiter.extension.MavenJupiterExtension;
import com.soebes.itf.jupiter.extension.MavenOption;
import com.soebes.itf.jupiter.extension.MavenPredefinedRepository;
import com.soebes.itf.jupiter.extension.MavenProject;
import com.soebes.itf.jupiter.extension.MavenRepository;
import com.soebes.itf.jupiter.extension.MavenTest;
@@ -48,7 +46,7 @@
@MavenRepository
//@MavenPredefinedRepository
@MavenProject
@TestMethodOrder( MethodOrderer.OrderAnnotation.class )
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
class GenerateCamelKafkaConnectorsMojoIT {

@MavenTest

0 comments on commit fd5d726

Please sign in to comment.