Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type safe getters to execution context #718

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9af12f8
Update development version to 4.1.1.BUILD-SNAPSHOT
fmbenhassine Oct 30, 2018
50d141d
Add assertion that a serializer was set in the JdbcExecutionContextDao
fmbenhassine Dec 11, 2018
481ad0e
Fix javadoc typo in PartitionStepBuilder#gridSize()
dimitrisli Nov 5, 2018
96e6ae2
Fix typo
fmbenhassine Nov 2, 2018
6dc22a7
Upgrade dependencies for version 4.1.1.RELEASE
fmbenhassine Jan 10, 2019
81552b3
Upgrade Spring Amqp and Integration versions
fmbenhassine Jan 11, 2019
a6d8ac1
Tweak XmlInputFactory settings
fmbenhassine Jan 11, 2019
cc63901
[artifactory-release] Release version 4.1.1.RELEASE
spring-builds Jan 11, 2019
d3ee8ed
[artifactory-release] Next development version
spring-builds Jan 11, 2019
7ea6656
Upgrade dependencies
fmbenhassine Jan 28, 2019
319c67c
Fix tests failing on windows
fmbenhassine Jan 18, 2019
72aaf9c
Minor polish
fmbenhassine Jan 25, 2019
ce82fc5
Fix JobOperatorFunctionalTests#testMultipleSimultaneousInstances
fmbenhassine Jan 15, 2019
eed1bd5
Fix tests failing randomly
fmbenhassine Jan 25, 2019
7803c1b
Fix integration tests
fmbenhassine Jan 30, 2019
008d081
Re-initialize datasource before each integration test
fmbenhassine Jan 30, 2019
bd4f442
Fix concurrency issue in RetryTransactionalPollingIntegrationTests
fmbenhassine Feb 1, 2019
79725d1
Treat MariaDB as MySQL
quaff Jan 31, 2019
9305808
URL Cleanup
spring-operator Mar 16, 2019
e673281
URL Cleanup
spring-operator Mar 21, 2019
d1d37bb
URL Cleanup
spring-operator Mar 26, 2019
167067b
URL Cleanup
spring-operator Mar 26, 2019
e28bcaa
Fix schema location of jsr 352 namespace
fmbenhassine Mar 26, 2019
9e31c42
Bump SF version to 5.1.6.BUILD-SNAPSHOT
fmbenhassine Mar 27, 2019
bf06ca5
Fix typo in log message
saikatbhadra Jan 29, 2019
7064f6b
Fix import in BeanValidatingItemProcessor
fmbenhassine Apr 2, 2019
6756495
Add new line in gradle.properties
fmbenhassine Apr 3, 2019
2590276
Update dependencies
fmbenhassine Apr 3, 2019
1e714b3
[artifactory-release] Release version 4.1.2.RELEASE
spring-builds Apr 3, 2019
c8a74b4
[artifactory-release] Next development version
spring-builds Apr 3, 2019
4fdd5f4
Mark the parameter of LineTokenizer#tokenize as `@Nullable`
fmbenhassine May 9, 2019
488cdaf
Update Spring projects dependencies to latest BUILD-SNAPSHOT
fmbenhassine Jun 14, 2019
dd6c0ea
add type safe getters to execution context
IlyaNerd Jun 25, 2019
4511c6e
sync
IlyaNerd Nov 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
222 changes: 100 additions & 122 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ buildscript {
classpath 'io.spring.gradle:spring-io-plugin:0.0.5.RELEASE'
classpath "io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2"
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.6"
classpath "org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16"
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.3"
classpath "org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.14"
}
}

Expand Down Expand Up @@ -46,30 +46,31 @@ allprojects {

environmentProperty = project.hasProperty('environment') ? getProperty('environment') : 'hsql'

springVersionDefault = '5.2.0.BUILD-SNAPSHOT'
springVersionDefault = '5.1.9.BUILD-SNAPSHOT'
springVersion = project.hasProperty('springVersion') ? getProperty('springVersion') : springVersionDefault
springRetryVersion = '1.2.4.RELEASE'
springAmqpVersion = '2.2.0.BUILD-SNAPSHOT'
springDataCommonsVersion = '2.2.0.BUILD-SNAPSHOT'
springDataGemfireVersion = '2.2.0.BUILD-SNAPSHOT'
springDataJpaVersion = '2.2.0.BUILD-SNAPSHOT'
springDataMongodbVersion = '2.2.0.BUILD-SNAPSHOT'
springDataNeo4jVersion = '5.2.0.BUILD-SNAPSHOT'
springIntegrationVersion = '5.2.0.BUILD-SNAPSHOT'
springKafkaVersion = '2.3.0.BUILD-SNAPSHOT'
springAmqpVersion = '2.1.8.BUILD-SNAPSHOT'
springDataCommonsVersion = '2.1.9.BUILD-SNAPSHOT'
springDataGemfireVersion = '2.1.9.BUILD-SNAPSHOT'
springDataJpaVersion = '2.1.9.BUILD-SNAPSHOT'
springDataMongodbVersion = '2.1.9.BUILD-SNAPSHOT'
springDataNeo4jVersion = '5.1.9.BUILD-SNAPSHOT'
springIntegrationVersion = '5.1.6.BUILD-SNAPSHOT'
springLdapVersion = '2.3.2.RELEASE'

activemqVersion = '5.15.9'
aspectjVersion = '1.9.3'
commonsDdbcpVersion = '2.6.0'
aspectjVersion = '1.9.2'
castorVersion = '1.4.1'
commonsCollectionsVersion = '3.2.2'
commonsDdbcpVersion = '2.5.0'
commonsIoVersion = '2.6'
commonsLangVersion = '3.9'
commonsLangVersion = '3.8.1'
commonsPoolVersion = '1.6'
derbyVersion = '10.14.2.0'
groovyVersion = '2.5.6'
hamcrestVersion = '1.3'
h2databaseVersion = '1.4.199'
hibernateVersion = '5.4.2.Final'
hibernateVersion = '5.4.0.Final'
hibernateValidatorVersion = '6.0.16.Final'
javaxElVersion = '3.0.0'
hsqldbVersion = '2.4.1'
Expand All @@ -81,28 +82,24 @@ allprojects {
javaxInjectVersion = '1'
javaxTransactionVersion = '1.3'
jbatchTckSpi = '1.0'
jettisonVersion = '1.2' //? => upgrade to 1.4 and the build fails (deprecated anyway via xstream)
jettisonVersion = '1.2' //?
jmsVersion = '2.0.1'
junitVersion = '4.12'
log4jVersion = '2.11.2'
mysqlVersion = '8.0.16'
mockitoVersion = '2.27.0'
mysqlVersion = '8.0.15'
mockitoVersion = '2.23.4'
postgresqlVersion = '42.2.5'
quartzVersion = '2.3.1'
servletApiVersion = '4.0.1'
sqlfireclientVersion = '1.0.3'
sqliteVersion = '3.27.2'
woodstoxVersion = '5.2.0'
sqliteVersion = '3.25.2'
woodstoxVersion = '5.0.3'
xmlunitVersion = '2.6.2'
xstreamVersion = '1.4.11.1'
jrubyVersion = '1.7.27'
xstreamVersion = '1.4.10'
jrubyVersion = '1.7.26'
beanshellVersion = '2.0b5'
jaxbApiVersion = '2.3.1'
jaxbImplVersion = '2.3.0.1'
micrometerVersion = '1.1.4'
prometheusPushgatewayVersion = '0.6.0'
docResourcesVersion = '0.1.1.RELEASE'
assertjVersion='3.12.2'
}

apply plugin: 'idea'
Expand Down Expand Up @@ -149,7 +146,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->

// enable all compiler warnings; individual projects may customize further
ext.xLintArg = '-Xlint:all'
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg] + '-proc:none'
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg]

tasks.withType(Test).all {
// suppress all console output during testing unless running `gradle -i`
Expand Down Expand Up @@ -186,23 +183,21 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
from javadoc
}

task checkTestConfigs {
doLast {
def configFiles = []
sourceSets.test.java.srcDirs.each {
fileTree(it).include('**/*.xml').exclude('**/log4j.xml').each { configFile ->
def configXml = new XmlParser(false, false).parse(configFile)
task checkTestConfigs << {
def configFiles = []
sourceSets.test.java.srcDirs.each {
fileTree(it).include('**/*.xml').exclude('**/log4j.xml').each { configFile ->
def configXml = new XmlParser(false, false).parse(configFile)

if (configXml.@'xsi:schemaLocation' ==~ /.*spring-[a-z-]*\d\.\d\.xsd.*/) {
configFiles << configFile
}
if (configXml.@'xsi:schemaLocation' ==~ /.*spring-[a-z-]*\d\.\d\.xsd.*/) {
configFiles << configFile
}
}
if (configFiles) {
throw new InvalidUserDataException('Hardcoded XSD version in the config files:\n' +
configFiles.collect { relativePath(it) }.join('\n') +
'\nPlease, use versionless schemaLocations for Spring XSDs to avoid issues with builds on different versions of dependencies.')
}
}
if (configFiles) {
throw new InvalidUserDataException('Hardcoded XSD version in the config files:\n' +
configFiles.collect {relativePath(it)}.join('\n') +
'\nPlease, use versionless schemaLocations for Spring XSDs to avoid issues with builds on different versions of dependencies.')
}
}

Expand Down Expand Up @@ -278,7 +273,6 @@ project('spring-batch-core') {
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile "javax.batch:javax.batch-api:$javaxBatchApiVersion"
compile "io.micrometer:micrometer-core:$micrometerVersion"

testCompile "org.springframework:spring-test:$springVersion"
testCompile "org.mockito:mockito-core:$mockitoVersion"
Expand Down Expand Up @@ -306,6 +300,12 @@ project('spring-batch-core') {
project('spring-batch-infrastructure') {
description = 'Spring Batch Infrastructure'

test {
if (JavaVersion.current().isJava7Compatible()) {
jvmArgs '-XX:MaxPermSize=256m'
}
}

dependencies {

compile "org.springframework:spring-core:$springVersion"
Expand All @@ -326,8 +326,6 @@ project('spring-batch-infrastructure') {
testCompile "org.mockito:mockito-core:$mockitoVersion"
testCompile "org.xerial:sqlite-jdbc:$sqliteVersion"
testCompile "javax.xml.bind:jaxb-api:$jaxbApiVersion"
testCompile "org.springframework.kafka:spring-kafka-test:$springKafkaVersion"
testCompile "org.assertj:assertj-core:$assertjVersion"

testRuntime "com.sun.mail:javax.mail:$javaMailVersion"
testRuntime "org.codehaus.groovy:groovy-jsr223:$groovyVersion"
Expand Down Expand Up @@ -384,7 +382,6 @@ project('spring-batch-infrastructure') {
optional "org.springframework.ldap:spring-ldap-core:$springLdapVersion"
optional "org.springframework.ldap:spring-ldap-core-tiger:$springLdapVersion"
optional "org.springframework.ldap:spring-ldap-ldif-core:$springLdapVersion"
optional "org.springframework.kafka:spring-kafka:$springKafkaVersion"
// JSR-305 only used for non-required meta-annotations
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
testCompileOnly("com.google.code.findbugs:jsr305:3.0.2")
Expand Down Expand Up @@ -461,6 +458,10 @@ project('spring-batch-infrastructure-tests') {
testCompile "org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:1.0.1"
testCompile "org.xmlunit:xmlunit-core:$xmlunitVersion"
testCompile "org.xmlunit:xmlunit-matchers:$xmlunitVersion"
testCompile ("org.codehaus.castor:castor-xml:$castorVersion") {
exclude group: 'stax', module: 'stax'
exclude group: 'commons-lang', module: 'commons-lang'
}
testCompile "org.apache.logging.log4j:log4j-api:$log4jVersion"
testCompile "org.apache.logging.log4j:log4j-core:$log4jVersion"
testCompile "com.thoughtworks.xstream:xstream:$xstreamVersion"
Expand Down Expand Up @@ -602,8 +603,6 @@ project('spring-batch-samples') {
compile "javax.mail:javax.mail-api:$javaMailVersion"
compile "org.apache.activemq:activemq-client:$activemqVersion"
compile "org.apache.activemq:activemq-broker:$activemqVersion"
compile "io.micrometer:micrometer-registry-prometheus:$micrometerVersion"
compile "io.prometheus:simpleclient_pushgateway:$prometheusPushgatewayVersion"

testCompile "org.xmlunit:xmlunit-core:$xmlunitVersion"
testCompile "org.xmlunit:xmlunit-matchers:$xmlunitVersion"
Expand Down Expand Up @@ -647,77 +646,35 @@ project('spring-batch-samples') {
}

apply plugin: "org.asciidoctor.convert"

asciidoctorj {
version = '1.5.5'
}

configurations {
docs
}

dependencies {
docs "io.spring.docresources:spring-doc-resources:${docResourcesVersion}@zip"
}

task prepareAsciidocBuild(type: Sync) {
dependsOn configurations.docs
// copy doc resources
from {
configurations.docs.collect { zipTree(it) }
}
// and doc sources
from "spring-batch-docs/asciidoc/"
// to a build directory of your choice
into "$buildDir/asciidoc/assemble"
}

task('makePDF', type: org.asciidoctor.gradle.AsciidoctorTask){
dependsOn prepareAsciidocBuild
backends 'pdf'
sourceDir "$buildDir/asciidoc/assemble"
asciidoctor {
sourceDir = file('spring-batch-docs/asciidoc')
sources {
include 'index-single.adoc'
include '*.adoc'
}
options doctype: 'book', eruby: 'erubis'
logDocuments = true
attributes 'icons': 'font',
'sectanchors': '',
'sectnums': '',
'toc': '',
'source-highlighter' : 'coderay',
revnumber: project.version
}

asciidoctor {
dependsOn makePDF
backends 'html5'
sourceDir "$buildDir/asciidoc/assemble"
resources {
from(sourceDir) {
include 'images/*', 'css/**', 'js/**'
include 'images/**'
include 'jsfiles/**'
include 'tocbot-3.0.2/**'
}
}
options doctype: 'book', eruby: 'erubis'
logDocuments = true
attributes 'docinfo': 'shared',
// use provided stylesheet
stylesdir: "css/",
stylesheet: 'spring.css',
'linkcss': true,
'icons': 'font',
'sectanchors': '',
// use provided highlighter
'source-highlighter=highlight.js',
'highlightjsdir=js/highlight',
'highlightjs-theme=atom-one-dark-reasonable',
'idprefix': '',
'idseparator': '-',
'spring-version': project.version,
'allow-uri-read': '',
revnumber: project.version
}
backends = ["html", "pdf"]
options doctype: 'book', eruby: 'erubis'
attributes 'icons': 'font',
'idprefix': '',
'idseparator': '-',
docinfo: 'shared',
revnumber: project.version,
sectanchors: '',
sectnums: '',
'source-highlighter': 'coderay@', // TODO switch to 'rouge' once supported by the html5 backend
stylesdir: 'stylesheets/',
stylesheet: 'spring.css',
'spring-version': project.version,
'allow-uri-read': ''

}

apply plugin: 'org.sonarqube'

Expand Down Expand Up @@ -798,18 +755,39 @@ task docsZip(type: Zip) {
into 'api'
}

from (makePDF) {
include "index-single.pdf"
from (asciidoctor) {
exclude '*.pdf'
exclude '*.html'
exclude 'images'
exclude 'jsfiles'
exclude 'tocbot-3.0.2'
exclude 'html/index-pdf.html'
exclude 'pdf/images'
exclude 'pdf/jsfiles'
exclude 'pdf/tocbot-3.0.2'
exclude 'pdf/appendix.pdf'
exclude 'pdf/common-patterns.pdf'
exclude 'pdf/domain.pdf'
exclude 'pdf/index.pdf'
exclude 'pdf/toggle.pdf'
exclude 'pdf/job.pdf'
exclude 'pdf/jsr-352.pdf'
exclude 'pdf/readersAndWriters.pdf'
exclude 'pdf/repeat.pdf'
exclude 'pdf/retry.pdf'
exclude 'pdf/scalability.pdf'
exclude 'pdf/schema-appendix.pdf'
exclude 'pdf/spring-batch-integration.pdf'
exclude 'pdf/spring-batch-intro.pdf'
exclude 'pdf/step.pdf'
exclude 'pdf/testing.pdf'
exclude 'pdf/transaction-appendix.pdf'
exclude 'pdf/whatsnew.pdf'
exclude 'pdf/glossary.pdf'

rename 'index-single.pdf', 'spring-batch-reference.pdf'
into 'reference/pdf'
}

from (asciidoctor) {
include "*.html"
include "css/**"
include "js/**"
include "images/**"
into 'reference/html'
into 'reference'
}
}

Expand Down Expand Up @@ -938,7 +916,7 @@ or specify the Gradle property `TCK_HOME`, e.g: ./gradlew runTck -PTCK_HOME=/pat
}
}

wrapper {
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '4.10.3'
gradleVersion = '4.10'
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=4.2.0.BUILD-SNAPSHOT
version=4.1.3.BUILD-SNAPSHOT
Loading