Skip to content

Commit 9d9218b

Browse files
committed
Upgraded minimum requirement for Neo4j
This commit upgrades the minimum requiremnt for Neo4J to be in alignment with the rest of the Spring IO platform. Because of this, the Neo4J4 module has been removed since the main line is now at the current level.
1 parent eb509dd commit 9d9218b

File tree

6 files changed

+31
-352
lines changed

6 files changed

+31
-352
lines changed

build.gradle

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ allprojects {
3939
maven { url 'https://repo.spring.io/plugins-release' }
4040
maven { url "https://repo.spring.io/libs-snapshot" }
4141

42+
maven { url 'https://m2.neo4j.org/content/repositories/snapshots' }
4243
maven { url 'https://m2.neo4j.org/content/repositories/releases'}
4344
mavenCentral()
4445
}
@@ -55,8 +56,7 @@ allprojects {
5556
springDataGemfireVersion = '2.0.0.BUILD-SNAPSHOT'
5657
springDataJpaVersion = '2.0.0.BUILD-SNAPSHOT'
5758
springDataMongodbVersion = '2.0.0.BUILD-SNAPSHOT'
58-
springDataNeo4jVersion = '3.4.5.RELEASE'
59-
springDataNeo4j4Version = '5.0.0.BUILD-SNAPSHOT' //?
59+
springDataNeo4jVersion = '5.0.0.BUILD-SNAPSHOT'
6060
springIntegrationVersion = '5.0.0.BUILD-SNAPSHOT'
6161
springLdapVersion = '2.0.4.RELEASE'
6262

@@ -84,7 +84,7 @@ allprojects {
8484
javaxTransactionVersion = '1.2'
8585
jbatchTckSpi = '1.0'
8686
jettisonVersion = '1.2'
87-
jmsVersion = '1.1-rev-1'
87+
jmsVersion = '2.0.1'
8888
jtdsVersion = '1.3.1' //?
8989
junitVersion = '4.12'
9090
log4jVersion = '1.2.17'
@@ -333,7 +333,7 @@ project('spring-batch-infrastructure') {
333333

334334
testRuntime "org.beanshell:bsh:$beanshellVersion"
335335

336-
optional "javax.jms:jms-api:$jmsVersion"
336+
optional "javax.jms:javax.jms-api:$jmsVersion"
337337
optional "org.slf4j:slf4j-log4j12:$slf4jVersion"
338338
optional "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
339339
compile("org.hibernate:hibernate-core:$hibernateVersion") { dep ->
@@ -392,43 +392,6 @@ project('spring-batch-infrastructure') {
392392
}
393393
}
394394

395-
project('spring-batch-infrastructure-neo4j4') {
396-
397-
merge.into = project(':spring-batch-infrastructure')
398-
399-
dependencies {
400-
optional ("org.springframework.data:spring-data-neo4j:$springDataNeo4j4Version") {
401-
exclude group: 'org.springframework', module: 'spring-core'
402-
exclude group: 'org.springframework', module: 'spring-aspects'
403-
exclude group: 'org.springframework', module: 'spring-web'
404-
exclude group: 'org.springframework', module: 'spring-context'
405-
exclude group: 'org.springframework', module: 'spring-tx'
406-
exclude group: 'org.springframework', module: 'spring-beans'
407-
exclude group: 'org.springframework', module: 'spring-aop'
408-
exclude group: 'org.springframework', module: 'spring-expression'
409-
}
410-
optional "org.springframework:spring-core:$springVersion"
411-
optional "org.springframework:spring-context:$springVersion"
412-
optional "org.springframework:spring-aspects:$springVersion"
413-
optional "org.springframework:spring-web:$springVersion"
414-
optional "org.springframework:spring-tx:$springVersion"
415-
optional "org.springframework:spring-beans:$springVersion"
416-
optional "org.springframework:spring-aop:$springVersion"
417-
optional "org.springframework:spring-expression:$springVersion"
418-
testCompile "org.mockito:mockito-core:$mockitoVersion"
419-
testCompile "junit:junit:${junitVersion}"
420-
}
421-
422-
if (project.hasProperty('platformVersion')) {
423-
def dataNeo4jVersion = dependencyManagement.springIoTestRuntime.managedVersions['org.springframework.data:spring-data-neo4j']
424-
if (dataNeo4jVersion?.startsWith('3.')) {
425-
tasks.withType(Test).matching { it.name =~ "springIoJdk.Test" }.all {
426-
enabled false
427-
}
428-
}
429-
}
430-
}
431-
432395
project('spring-batch-core-tests') {
433396
description = 'Spring Batch Core Tests'
434397
project.tasks.findByPath("artifactoryPublish")?.enabled = false
@@ -470,7 +433,7 @@ project('spring-batch-infrastructure-tests') {
470433
project.tasks.findByPath("artifactoryPublish")?.enabled = false
471434
dependencies {
472435
compile project(":spring-batch-infrastructure")
473-
compile "javax.jms:jms-api:1.1-rev-1"
436+
compile "javax.jms:javax.jms-api:$jmsVersion"
474437
compile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion"
475438
compile "org.springframework:spring-tx:$springVersion"
476439
compile "org.springframework:spring-aop:$springVersion"
@@ -580,7 +543,7 @@ project('spring-batch-integration') {
580543
}
581544
testCompile "org.springframework.integration:spring-integration-jdbc:$springIntegrationVersion"
582545

583-
optional "javax.jms:jms-api:$jmsVersion"
546+
optional "javax.jms:javax.jms-api:$jmsVersion"
584547
optional "org.slf4j:slf4j-log4j12:$slf4jVersion"
585548
optional "log4j:log4j:$log4jVersion"
586549
optional "org.springframework.integration:spring-integration-jms:$springIntegrationVersion"

settings.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ rootProject.name = 'spring-batch'
33
include 'spring-batch-core'
44
include 'spring-batch-core-tests'
55
include 'spring-batch-infrastructure'
6-
include 'spring-batch-infrastructure-neo4j4'
76
include 'spring-batch-infrastructure-tests'
87
include 'spring-batch-test'
98
include 'spring-batch-integration'

spring-batch-infrastructure-neo4j4/src/main/java/org/springframework/batch/item/data/Neo4j4ItemReader.java

Lines changed: 0 additions & 47 deletions
This file was deleted.

spring-batch-infrastructure-neo4j4/src/test/java/org/springframework/batch/item/data/Neo4j4ItemReaderTests.java

Lines changed: 0 additions & 175 deletions
This file was deleted.

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/Neo4jItemReader.java

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,58 +18,25 @@
1818

1919
import java.util.ArrayList;
2020
import java.util.Iterator;
21-
import java.util.Map;
22-
23-
import org.apache.commons.logging.Log;
24-
import org.apache.commons.logging.LogFactory;
25-
26-
import org.springframework.data.neo4j.conversion.DefaultConverter;
27-
import org.springframework.data.neo4j.conversion.Result;
28-
import org.springframework.data.neo4j.conversion.ResultConverter;
29-
import org.springframework.util.ClassUtils;
21+
//
22+
//import org.springframework.data.neo4j.conversion.ResultConverter;
3023

3124
/**
3225
* <p>
33-
* Extensions of the {@link AbstractNeo4jItemReader} intended for use with versions of
34-
* Spring Data Neo4J &lt; 4. Conversions of the results are done using an external
35-
* {@link ResultConverter}.
26+
* Extensions of the {@link AbstractNeo4jItemReader}.
3627
* </p>
3728
*
3829
* @author Michael Minella
39-
* @see org.springframework.batch.item.data.Neo4j4ItemReader
4030
*/
4131
public class Neo4jItemReader<T> extends AbstractNeo4jItemReader {
4232

43-
protected Log logger = LogFactory.getLog(getClass());
44-
45-
private ResultConverter<Map<String, Object>, T> resultConverter;
46-
47-
public Neo4jItemReader() {
48-
setName(ClassUtils.getShortName(Neo4jItemReader.class));
49-
}
50-
51-
/**
52-
* Set the converter used to convert node to the targetType. By
53-
* default, {@link DefaultConverter} is used.
54-
*
55-
* @param resultConverter the converter to use.
56-
*/
57-
public void setResultConverter(ResultConverter<Map<String, Object>, T> resultConverter) {
58-
this.resultConverter = resultConverter;
59-
}
60-
6133
@Override
6234
protected Iterator<T> doPageRead() {
63-
Result<Map<String, Object>> queryResults = getTemplate().query(
64-
generateLimitCypherQuery(), getParameterValues());
35+
Iterable queryResults = getTemplate().queryForObjects(
36+
getTargetType(), generateLimitCypherQuery(), getParameterValues());
6537

6638
if(queryResults != null) {
67-
if (resultConverter != null) {
68-
return queryResults.to(getTargetType(), resultConverter).iterator();
69-
}
70-
else {
71-
return queryResults.to(getTargetType()).iterator();
72-
}
39+
return queryResults.iterator();
7340
}
7441
else {
7542
return new ArrayList<T>().iterator();

0 commit comments

Comments
 (0)