Skip to content

Commit

Permalink
Parent refactor (#1)
Browse files Browse the repository at this point in the history
* Refactored to use parent pom. Moved namespace to common namespace.

* Changed to common kafka-connect pipeline.

* Checkstyle cleanup.

* Moved to config.
  • Loading branch information
jcustenborder authored Jan 24, 2017
1 parent a92ba8d commit 5539e48
Show file tree
Hide file tree
Showing 21 changed files with 663 additions and 633 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
TwitterSourceConnector.properties
TwitterSourceConnector.properties
*.iml
/target/
14 changes: 3 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#!groovy
node {
def jdk8_docker_image = 'maven:3.3.3-jdk-8'
@Library('jenkins-pipeline') import com.github.jcustenborder.jenkins.pipeline.KafkaConnectPipeline

checkout scm

docker.image(jdk8_docker_image).inside {
stage('build') {
sh "mvn --batch-mode clean package"
junit '**/target/surefire-reports/TEST-*.xml'
}
}
}
def pipe = new KafkaConnectPipeline()
pipe.execute()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Twitter Status object as possible.
```
name=TwitterSourceConnector
tasks.max=1
connector.class=io.confluent.kafka.connect.twitter.TwitterSourceConnector
connector.class=com.github.jcustenborder.kafka.connect.TwitterSourceConnector
twitter.oauth.consumerKey=<insert your value>
twitter.oauth.consumerSecret=<insert your value>
twitter.oauth.accessToken=<insert your value>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Copyright (C) 2016 Jeremy Custenborder ([email protected])
# Copyright © 2016 Jeremy Custenborder ([email protected])
#
# 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
# 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,
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Copyright (C) 2016 Jeremy Custenborder ([email protected])
# Copyright © 2016 Jeremy Custenborder ([email protected])
#
# 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
# 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,
Expand Down
147 changes: 49 additions & 98 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,58 @@
<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>
<?xml version="1.0"?>
<!--
<groupId>io.confluent.examples</groupId>
<artifactId>kafka-connect-twitter</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
Copyright © 2016 Jeremy Custenborder ([email protected])
<name>kafka-connect-twitter</name>
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.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.jcustenborder.kafka.connect</groupId>
<artifactId>kafka-connect-parent</artifactId>
<version>0.10.1.0-cp1</version>
</parent>
<artifactId>kafka-connect-twitter</artifactId>
<version>0.2-SNAPSHOT</version>
<name>kafka-connect-twitter</name>
<url>https://github.com/jcustenborder/kafka-connect-twitter</url>
<inceptionYear>2016</inceptionYear>
<developers>
<developer>
<name>Jeremy Custenborder</name>
<email>[email protected]</email>
<url>https://api.github.com/users/jcustenborder</url>
<roles>
<role>maintainer</role>
</roles>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/jcustenborder/kafka-connect-twitter.git</connection>
<developerConnection>scm:git:[email protected]:jcustenborder/kafka-connect-twitter.git</developerConnection>
<url>https://api.github.com/repos/jcustenborder/kafka-connect-twitter</url>
</scm>
<issueManagement>
<system>github</system>
<url>https://api.github.com/repos/jcustenborder/kafka-connect-twitter/issues</url>
</issueManagement>
<properties>
<kafka.version>0.10.0.0-cp1</kafka.version>
<twitter4j.version>[4.0,)</twitter4j.version>
<junit.version>4.12</junit.version>
</properties>

<dependencies>
<dependency>
<groupId>io.confluent.kafka</groupId>
<artifactId>connect-utils</artifactId>
<version>[0.1.0,0.1.100)</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
Expand All @@ -36,81 +63,5 @@
<artifactId>twitter4j-stream</artifactId>
<version>${twitter4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<version>${kafka.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.0.106-beta</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<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.7</source>
<target>1.7</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>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>confluent</id>
<url>http://packages.confluent.io/maven/</url>
</repository>
</repositories>

</project>
</project>
40 changes: 0 additions & 40 deletions src/main/assembly/package.xml

This file was deleted.

Loading

0 comments on commit 5539e48

Please sign in to comment.