diff --git a/.gitignore b/.gitignore index bfa6a22..a207622 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ # Created by .ignore support plugin (hsz.mobi) +target/ diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..c8450f1 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,23 @@ +#!groovy +node { + def mvnBuildNumber = "0.1.${env.BUILD_NUMBER}" + + def mvnHome = tool 'M3' + + checkout scm + + if (env.BRANCH_NAME == 'master') { + stage 'versioning' + sh "${mvnHome}/bin/mvn -B versions:set -DgenerateBackupPoms=false -DnewVersion=${mvnBuildNumber}" + } + + stage 'build' + sh "${mvnHome}/bin/mvn -B -P maven-central clean verify package" + + junit '**/target/surefire-reports/TEST-*.xml' + + if (env.BRANCH_NAME == 'master') { + stage 'publishing' + sh "${mvnHome}/bin/mvn -B -P github,maven-central deploy" + } +} \ No newline at end of file diff --git a/bin/suspend.sh b/bin/suspend.sh index c3ec2c1..519c0c0 100755 --- a/bin/suspend.sh +++ b/bin/suspend.sh @@ -25,7 +25,7 @@ else exit 1 fi -export CLASSPATH="$(find `pwd`/target/kafka-connect-salesforce-1.0-SNAPSHOT-package/share/java/ -type f -name '*.jar' | tr '\n' ':')" +export CLASSPATH="$(find target/ -type f -name '*.jar'| grep '\-package' | tr '\n' ':')" export KAFKA_JMX_OPTS='-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005' $CONFLUENT_HOME/bin/connect-standalone connect/connect-avro-docker.properties config/salesforce.properties \ No newline at end of file diff --git a/pom.xml b/pom.xml index 20092e9..43c5f74 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,36 @@ kafka-connect-splunk + https://github.com/jcustenborder/kafka-connect-splunk + + + + The Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0 + repo + + + + + + jcustenborder + Jeremy Custenborder + jcustenborder@gmail.com + America/Chicago + + + + + https://github.com/jcustenborder/kafka-connect-splunk + scm:git:https://github.com/jcustenborder/kafka-connect-splunk.git + scm:git:git://git@github.com:jcustenborder/kafka-connect-splunk.git + + + + https://github.com/jcustenborder/kafka-connect-splunk/issues + github + + 0.10.0.0-cp1 4.12 @@ -72,11 +102,6 @@ google-http-client-jackson2 1.22.0 - - com.google.oauth-client - google-oauth-client-jetty - 1.22.0 - org.eclipse.jetty jetty-util @@ -214,6 +239,101 @@ + + + github + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + ${gpg.keyname} + ${gpg.keyname} + + + + + + de.jutzig + github-release-plugin + 1.1.1 + + + deploy-to-github + deploy + + release + + + ${project.version} + ${project.version} + ${project.version} + + + + + ${project.build.directory} + + ${project.artifactId}*.tar.gz + ${project.artifactId}*.tar.gz.asc + + + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + + + + true + true + true + true + + + + deploy-to-sonatype + deploy + + + + + + + + + + + + oss.sonatype.org + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + oss.sonatype.org + https://oss.sonatype.org/content/repositories/snapshots + + + + confluent diff --git a/src/main/assembly/package.xml b/src/main/assembly/package.xml index c5e5522..e6298dd 100644 --- a/src/main/assembly/package.xml +++ b/src/main/assembly/package.xml @@ -23,6 +23,7 @@ package dir + tar.gz false diff --git a/src/main/java/io/confluent/kafka/connect/splunk/EventConverter.java b/src/main/java/io/confluent/kafka/connect/splunk/EventConverter.java index 3cde9d2..d223ec0 100644 --- a/src/main/java/io/confluent/kafka/connect/splunk/EventConverter.java +++ b/src/main/java/io/confluent/kafka/connect/splunk/EventConverter.java @@ -1,12 +1,12 @@ /** * Copyright (C) ${project.inceptionYear} Jeremy Custenborder (jcustenborder@gmail.com) - *

+ * * 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, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/src/main/java/io/confluent/kafka/connect/splunk/SinkRecordContent.java b/src/main/java/io/confluent/kafka/connect/splunk/SinkRecordContent.java index 0ab588d..83f6b0e 100644 --- a/src/main/java/io/confluent/kafka/connect/splunk/SinkRecordContent.java +++ b/src/main/java/io/confluent/kafka/connect/splunk/SinkRecordContent.java @@ -1,12 +1,12 @@ /** * Copyright (C) ${project.inceptionYear} Jeremy Custenborder (jcustenborder@gmail.com) - *

+ * * 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, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/src/main/java/io/confluent/kafka/connect/splunk/SplunkHttpSinkTask.java b/src/main/java/io/confluent/kafka/connect/splunk/SplunkHttpSinkTask.java index 2104f59..435a30e 100644 --- a/src/main/java/io/confluent/kafka/connect/splunk/SplunkHttpSinkTask.java +++ b/src/main/java/io/confluent/kafka/connect/splunk/SplunkHttpSinkTask.java @@ -1,12 +1,12 @@ /** * Copyright (C) ${project.inceptionYear} Jeremy Custenborder (jcustenborder@gmail.com) - *

+ * * 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, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/src/test/java/io/confluent/kafka/connect/splunk/SinkRecordContentTest.java b/src/test/java/io/confluent/kafka/connect/splunk/SinkRecordContentTest.java index c1f6cf3..f9bec3d 100644 --- a/src/test/java/io/confluent/kafka/connect/splunk/SinkRecordContentTest.java +++ b/src/test/java/io/confluent/kafka/connect/splunk/SinkRecordContentTest.java @@ -1,12 +1,12 @@ /** * Copyright (C) ${project.inceptionYear} Jeremy Custenborder (jcustenborder@gmail.com) - *

+ * * 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, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.