INTEXT-191: Add Apache Kafka Sample

JIRA: https://jira.spring.io/browse/INTEXT-191

Polishing and build.gradle fix for pom generation
This commit is contained in:
Gary Russell
2015-09-11 13:05:41 -04:00
committed by Artem Bilan
parent 4d535741e9
commit ecab656cc1
62 changed files with 1715 additions and 1349 deletions

View File

@@ -101,43 +101,36 @@ subprojects { subproject ->
}
}
if (subproject.plugins.hasPlugin('jetty')) {
packaging = 'war'
build {
plugins {
plugin {
groupId = 'org.mortbay.jetty'
artifactId = 'jetty-maven-plugin'
version = '8.1.14.v20131031'
configuration {
webAppConfig {
contextPath = '/' + subproject.name
}
}
}
}
}
}
if (subproject.plugins.hasPlugin('spring-boot')) {
parent {
groupId = 'org.springframework.boot'
artifactId = 'spring-boot-starter-parent'
version = springBootVersion
}
build {
plugins {
plugin {
groupId = 'org.springframework.boot'
artifactId = 'spring-boot-maven-plugin'
}
}
}
}.withXml {
if (subproject.plugins.hasPlugin('jetty')) {
asNode().appendNode('packaging', 'war')
asNode().appendNode('build')
.appendNode('plugins')
.appendNode('plugin').with {
appendNode('groupId', 'org.mortbay.jetty')
appendNode('artifactId', 'jetty-maven-plugin')
appendNode('version', '8.1.14.v20131031')
appendNode('configuration')
.appendNode('webAppConfig')
.appendNode('contextPath', '/' + subproject.name)
}
}
if (subproject.plugins.hasPlugin('spring-boot')) {
asNode().appendNode('build').appendNode('plugins')
.appendNode('plugin').with {
appendNode('groupId', 'org.springframework.boot')
appendNode('artifactId', 'spring-boot-maven-plugin')
}
}
}.writeTo('pom.xml')
}
}
}.writeTo('pom.xml')
}
eclipse {
@@ -155,7 +148,7 @@ subprojects { subproject ->
toolVersion = "0.7.2.201409121644"
}
sourceCompatibility = 1.6
sourceCompatibility = 1.8
ext {
activeMqVersion = '5.11.1'
@@ -201,6 +194,7 @@ subprojects { subproject ->
slf4jVersion = '1.7.11'
springIntegrationVersion = '4.2.0.RELEASE'
springIntegrationDslVersion = '1.1.0.RELEASE'
springIntegrationKafkaVersion = '1.2.2.BUILD-SNAPSHOT'
springVersion = '4.2.0.RELEASE'
springSecurityVersion = '4.0.2.RELEASE'
springWebFlowVersion = '2.3.3.RELEASE'
@@ -214,8 +208,6 @@ subprojects { subproject ->
// dependencies that are common across all java projects
dependencies {
compile "log4j:log4j:$log4jVersion"
testCompile("junit:junit:$junitVersion") {
exclude group: 'org.hamcrest'
}
@@ -284,6 +276,7 @@ project('advanced-testing-examples') {
compile "javax.jms:jms-api:$jmsApiVersion"
compile "org.springframework.integration:spring-integration-jms:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-groovy:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -292,6 +285,7 @@ project('dynamic-ftp') {
dependencies {
compile "org.springframework.integration:spring-integration-ftp:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -305,6 +299,7 @@ project('cafe-si') {
dependencies {
compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion"
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -314,6 +309,7 @@ project('cafe-amqp') {
dependencies {
compile project(":cafe-si")
compile "org.springframework.integration:spring-integration-amqp:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -327,6 +323,7 @@ project('cafe-jms') {
exclude group: "org.springframework"
}
compile "org.springframework.integration:spring-integration-jms:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -341,6 +338,7 @@ project('cafe-scripted') {
compile "org.jruby:jruby:$jrubyVersion"
compile "org.python:jython-standalone:$jythonVersion"
compile "org.codehaus.groovy:groovy-all:$groovyVersion"
compile "log4j:log4j:$log4jVersion"
}
task runCafeDemoApp(type: JavaExec) {
@@ -364,6 +362,7 @@ project('loan-broker') {
dependencies {
compile "org.springframework.integration:spring-integration-ip:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
task runLoanBrokerSharkDetectorDemo(type: JavaExec) {
@@ -405,6 +404,7 @@ project('loanshark') {
compile "org.eclipse.persistence:javax.persistence:$jpaApiVersion"
compile "org.hibernate:hibernate-entitymanager:$hibernateVersion"
compile "org.springframework.webflow:spring-js:$springWebFlowVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -415,6 +415,7 @@ project('amqp') {
dependencies {
compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-amqp:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
task runSimple(type: JavaExec) {
@@ -455,6 +456,11 @@ project('barrier') {
springBoot {
mainClass = 'org.springframework.integration.samples.barrier.Application'
}
task run(type: JavaExec) {
main 'org.springframework.integration.samples.barrier.Application'
classpath = sourceSets.main.runtimeClasspath
}
}
project('control-bus') {
@@ -462,6 +468,7 @@ project('control-bus') {
dependencies {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -475,6 +482,7 @@ project('enricher') {
dependencies {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "com.h2database:h2:$h2Version"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -483,6 +491,7 @@ project('feed') {
dependencies {
compile "org.springframework.integration:spring-integration-feed:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -491,6 +500,7 @@ project('file') {
dependencies {
compile "org.springframework.integration:spring-integration-file:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -502,6 +512,7 @@ project('ftp') {
compile "commons-io:commons-io:$commonsIoVersion"
compile "org.apache.ftpserver:ftpserver-core:$ftpServerVersion"
compile "org.slf4j:slf4j-log4j12:$slf4jVersion"
compile "log4j:log4j:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
}
@@ -516,6 +527,7 @@ project('helloworld') {
dependencies {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
task runHelloWorldApp(type: JavaExec) {
@@ -546,10 +558,35 @@ project('http') {
compile "commons-fileupload:commons-fileupload:$commonsFileUploadVersion"
compile "commons-io:commons-io:$commonsIoVersion"
compile "javax.mail:javax.mail-api:$javaxMailVersion"
compile "log4j:log4j:$log4jVersion"
}
}
project('kafka') {
description = 'Apache Kafka Sample'
apply plugin: 'spring-boot'
dependencies {
compile 'org.springframework.boot:spring-boot-starter-integration'
compile("org.springframework.integration:spring-integration-kafka:$springIntegrationKafkaVersion") {
exclude group: 'org.slf4j'
}
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
springBoot {
mainClass = 'org.springframework.integration.samples.kafka.Application'
}
task run(type: JavaExec) {
main 'org.springframework.integration.samples.kafka.Application'
classpath = sourceSets.main.runtimeClasspath
}
}
project('si4demo') {
description = 'Java Configuration/DSL Sample'
@@ -616,6 +653,7 @@ project('jdbc') {
dependencies {
compile "org.springframework.integration:spring-integration-jdbc:$springIntegrationVersion"
compile "com.h2database:h2:$h2Version"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -634,6 +672,7 @@ project('jms') {
compile("org.apache.activemq:activemq-kahadb-store:$activeMqVersion") {
exclude group: "org.springframework"
}
compile "log4j:log4j:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
}
@@ -645,6 +684,7 @@ project('jmx') {
dependencies {
compile "org.springframework.integration:spring-integration-jmx:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -661,6 +701,7 @@ project('jpa') {
compile "org.hibernate:hibernate-entitymanager:$hibernateVersion"
compile "org.eclipse.persistence:javax.persistence:$jpaApiVersion"
compile "commons-lang:commons-lang:$commonsLangVersion"
compile "log4j:log4j:$log4jVersion"
runtime "org.springframework:spring-instrument:$springVersion"
runtime "org.apache.openjpa:openjpa:$openJpaVersion"
@@ -686,6 +727,7 @@ project('mail') {
compile "org.springframework:spring-context:$springVersion"
compile "javax.mail:javax.mail-api:$javaxMailVersion"
compile "com.sun.mail:mailapi:$javaxMailVersion"
compile "log4j:log4j:$log4jVersion"
}
task runGmailInboundPop3AdapterTestApp(type: JavaExec) {
@@ -705,6 +747,7 @@ project('mongodb') {
dependencies {
compile "org.springframework.integration:spring-integration-mongodb:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
task runMongoDbInboundAdapterDemo(type: JavaExec) {
@@ -723,6 +766,7 @@ project('oddeven') {
dependencies {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
task runCronOddEvenDemo(type: JavaExec) {
@@ -741,6 +785,7 @@ project('quote') {
dependencies {
compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -750,6 +795,7 @@ project('sftp') {
dependencies {
compile "org.springframework.integration:spring-integration-sftp:$springIntegrationVersion"
compile "org.apache.sshd:sshd-core:$apacheSshdVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -764,6 +810,7 @@ project('tcp-amqp') {
compile "org.springframework.integration:spring-integration-amqp:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-ip:$springIntegrationVersion"
compile "org.slf4j:slf4j-log4j12:$slf4jVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -778,6 +825,7 @@ project('tcp-client-server') {
compile "org.springframework.integration:spring-integration-ip:$springIntegrationVersion"
compile "commons-lang:commons-lang:$commonsLangVersion"
compile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -793,6 +841,7 @@ project('testing-examples') {
compile "org.springframework.integration:spring-integration-http:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-ws:$springIntegrationVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile "log4j:log4j:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
}
@@ -803,6 +852,7 @@ project('twitter') {
dependencies {
compile "org.springframework.integration:spring-integration-twitter:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
test {
@@ -820,6 +870,7 @@ project('ws-inbound-gateway') {
compile "org.springframework.integration:spring-integration-xml:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-ws:$springIntegrationVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile "log4j:log4j:$log4jVersion"
}
test {
@@ -838,6 +889,7 @@ project('ws-outbound-gateway') {
compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-ws:$springIntegrationVersion"
// compile 'com.sun.xml.messaging.saaj:saaj-impl:1.3.19'
compile "log4j:log4j:$log4jVersion"
}
}
@@ -850,6 +902,7 @@ project('xml') {
dependencies {
compile "org.springframework.integration:spring-integration-xml:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -858,6 +911,7 @@ project('xmpp') {
dependencies {
compile "org.springframework.integration:spring-integration-xmpp:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
test {
@@ -874,6 +928,7 @@ project('async-gateway') {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "io.projectreactor:reactor-stream:$reactorVersion"
compile "io.projectreactor.spring:reactor-spring-context:$reactorVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -886,6 +941,7 @@ project('dynamic-poller') {
dependencies {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -894,6 +950,7 @@ project('errorhandling') {
dependencies {
compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -902,6 +959,7 @@ project('file-processing') {
dependencies {
compile "org.springframework.integration:spring-integration-file:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -918,6 +976,7 @@ project('mail-attachments') {
compile "javax.mail:javax.mail-api:$javaxMailVersion"
compile "commons-io:commons-io:$commonsIoVersion"
compile "com.sun.mail:mailapi:$javaxMailVersion"
compile "log4j:log4j:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
testCompile "org.subethamail:subethasmtp-wiser:$subethasmtpVersion"
@@ -940,6 +999,7 @@ project('monitoring') {
compile "org.springframework.integration:spring-integration-groovy:$springIntegrationVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile "javax.servlet:jstl:$jstlVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -955,6 +1015,7 @@ project('multipart-http') {
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
compile "commons-fileupload:commons-fileupload:$commonsFileUploadVersion"
compile "commons-io:commons-io:$commonsIoVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -976,6 +1037,7 @@ project('rest-http') {
compile "org.springframework.security:spring-security-web:$springSecurityVersion"
compile "org.springframework.security:spring-security-config:$springSecurityVersion"
compile "org.jasypt:jasypt:$jasyptVersion"
compile "log4j:log4j:$log4jVersion"
}
test {
@@ -996,6 +1058,7 @@ project('retry-and-more') {
exclude group: 'org.hamcrest'
}
compile "org.hamcrest:hamcrest-all:$hamcrestVersion"
compile "log4j:log4j:$log4jVersion"
}
task runCircuitBreakerDemo(type: JavaExec) {
@@ -1034,6 +1097,7 @@ project('splitter-aggregator-reaper') {
dependencies {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "javax.inject:javax.inject:$javaxInjectVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -1048,6 +1112,7 @@ project('stored-procedures-derby') {
dependencies {
compile "org.springframework.integration:spring-integration-jdbc:$springIntegrationVersion"
compile "org.apache.derby:derby:$derbyVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -1066,6 +1131,7 @@ project('stored-procedures-oracle') {
compile "org.springframework.integration:spring-integration-jdbc:$springIntegrationVersion"
//TODO Uncomment it when the ojdbc6 artifact is available in the mavenLocal()
// compile "com.oracle:ojdbc6:$oracleDriverVersion"
compile "log4j:log4j:$log4jVersion"
}
test {
@@ -1084,6 +1150,7 @@ project('stored-procedures-ms') {
compile "org.springframework.integration:spring-integration-jdbc:$springIntegrationVersion"
compile "net.sourceforge.jtds:jtds:$jtdsVersion"
compile "c3p0:c3p0:$c3p0Version"
compile "log4j:log4j:$log4jVersion"
}
test {
@@ -1103,6 +1170,7 @@ project('stored-procedures-postgresql') {
compile "postgresql:postgresql:$postgresVersion"
compile "commons-dbcp:commons-dbcp:$commonsDbcpVersion"
compile "commons-pool:commons-pool:$commonsPoolVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -1111,6 +1179,7 @@ project('tcp-client-server-multiplex') {
dependencies {
compile "org.springframework.integration:spring-integration-ip:$springIntegrationVersion"
compile "log4j:log4j:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
}
@@ -1127,6 +1196,7 @@ project('travel') {
compile "org.springframework.integration:spring-integration-ws:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-http:$springIntegrationVersion"
compile "org.springframework:spring-web:$springVersion"
compile "log4j:log4j:$log4jVersion"
}
}
@@ -1141,6 +1211,7 @@ project('tx-synch') {
compile "org.springframework.integration:spring-integration-jdbc:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-file:$springIntegrationVersion"
compile "com.h2database:h2:$h2Version"
compile "log4j:log4j:$log4jVersion"
}
}