diff --git a/pom.xml b/pom.xml index 0db85dcc4..28f5ae74d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,149 +1,54 @@ - - 4.0.0 - org.springframework.data - spring-data-neo4j-dist - Spring Data Neo4j Distribution - - 2.2.0.BUILD-SNAPSHOT - pom - - spring-data-neo4j-parent - spring-data-neo4j - spring-data-neo4j-rest - spring-data-neo4j-tx + + + 4.0.0 + + org.springframework.data + spring-data-neo4j-parent + 2.2.0.BUILD-SNAPSHOT + pom + + Spring Data Neo4j Parent + Neo4j support for Spring Data + http://www.springsource.org/spring-data/neo4j + + + org.springframework.data.build + spring-data-parent + 1.0.0.RELEASE + ../spring-data-build/parent/pom.xml + + + + spring-data-neo4j spring-data-neo4j-aspects spring-data-neo4j-cross-store - - http://www.springsource.org/spring-data/neo4j - - SpringSource - http://www.springsource.com - - - http://github.com/SpringSource/spring-data-neo4j - scm:git:git://github.com/SpringSource/spring-data-neo4j.git - scm:git:git://github.com/SpringSource/spring-data-neo4j.git - - - JIRA - https://jira.springsource.org/browse/DATAGRAPH - - - - Spring Data Forums - http://forum.springsource.org/forumdisplay.php?f=80 - http://forum.springsource.org/forumdisplay.php?f=80 - - - - Bamboo - https://build.springsource.org/browse/SPRINGDATA-DATAGRAPH - + spring-data-neo4j-tx + spring-data-neo4j-rest + spring-data-neo4j-distribution + - - - trisberg - Thomas Risberg - trisberg at vmware.com - SpringSource - http://www.SpringSource.com - - Project Admin - - -5 - - - mpollack - Mark Pollack - mpollack at vmware.com - SpringSource - http://www.SpringSource.com - - Project Admin - - -5 - - - mhunger - Michael Hunger - michael.hunger at neotechnology.com - Neo Technology - http://www.neotechnology.com - - Project Admin - Developer - - +1 - - - dmontag - David Montag - david.montag at neotechnology.com - Neo Technology - http://www.neotechnology.com - - Developer - - -7 - - - systay - Andres Taylor - andres at neotechnology.com - Neo Technology - http://www.neotechnology.com - - Developer - - +1 - - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 - - Copyright 2010 the original author or authors. + + 1.6 + 1.6 - 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 + multi + spring-data-neo4j + spring-data-neo4j + + 1.5.0.RELEASE + 1.8.1 - 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. - - - - - - UTF-8 - - spring-data-neo4j - Spring Data Neo4j - SDNEO4J - ${project.version} - snapshot - ${dist.id}-${dist.version} - ${dist.finalName}.zip - target/${dist.fileName} - dist.springframework.org - - ${basedir}/src/docbkx - ${basedir}/spring-data-neo4j/target/docbkx - ${basedir}/target/classes + 0.10.1 + 0.5 + 1.2 + 1.5 + 1.5 + 1.9.M04 + + fast @@ -164,450 +69,115 @@ spring-data-neo4j-examples/backwardscompatibility - - staging - - - spring-site-staging - file:///${java.io.tmpdir}/spring-data/data-neo4j/docs/${project.version} - - - spring-milestone-staging - file:///${java.io.tmpdir}/spring-data/data-neo4j/milestone - - - spring-snapshot-staging - file:///${java.io.tmpdir}/spring-data/data-neo4j/snapshot - - - - - snapshot - - http://www.springsource.com/spring-data - - static.springframework.org - - scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-data/data-graph/snapshot-site/ - - - - spring-release - Spring Release Repository - s3://maven.springframework.org/release - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - - - - milestone - - - spring-milestone - Spring Milestone Repository - s3://maven.springframework.org/milestone - - - - - central - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - sonatype-nexus-staging - Nexus Release Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - - - - http://www.springsource.com/spring-data - - static.springframework.org - - scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-data/data-graph/snapshot-site/ - - - - spring-release - Spring Release Repository - s3://maven.springframework.org/release - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - + + + + mhunger + Michael Hunger + michael.hunger at neotechnology.com + Neo Technology + http://www.neotechnology.com + + Project Lead + + +1 + + + ogierke + Oliver Gierke + ogierke at vmware.com + SpringSource + http://www.springsource.com + + Developer + + +1 + + + trisberg + Thomas Risberg + trisberg at vmware.com + SpringSource + http://www.springsource.com + + Developer + + -5 + + + mpollack + Mark Pollack + mpollack at vmware.com + SpringSource + http://www.springsource.com + + Developer + + -5 + + + - - - - org.springframework.build.aws - org.springframework.build.aws.maven - 3.1.0.RELEASE - - - - - ${docbook.srcDir} - false - - - ${docbook.snippetsDir} - false - - - - - - com.agilejava.docbkx - docbkx-maven-plugin - 2.0.14 - - - org.apache.maven.plugins - maven-resources-plugin - 2.5 + maven-surefire-plugin + 2.12 - ${project.build.sourceEncoding} + once + true + false + + **/*Tests.java + + + **/PerformanceTests.java + + + src/test/resources/logging.properties + + - - - generate-sources - - resources - - - - - com.agilejava.docbkx - docbkx-maven-plugin - 2.0.14 - - - single-page - - generate-html - - - ${docbook.generatedDir} - true - ${docbook.generatedDir}/resources/xsl/html.xsl - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - pre-site - - - - single-pdf - - generate-pdf - - - ${docbook.generatedDir} - ${docbook.generatedDir}/ - ${docbook.generatedDir}/resources/images/ - ${docbook.generatedDir}/resources/xsl/fopdf.xsl - index.xml - 1 - 1 - - - - - - pre-site - - - tutorial-pdf - - generate-pdf - - - ${docbook.generatedDir} - ${docbook.generatedDir}/ - ${docbook.generatedDir}/resources/images/ - ${docbook.generatedDir}/resources/xsl/fopdf.xsl - 1 - 1 - tutorial.xml - - - - - - pre-site - - - multi-page - - generate-html - - - ${docbook.generatedDir} - true - true - ${docbook.generatedDir}/resources/xsl/html_chunk.xsl - 1 - 1 - - ${basedir}/target/docbkx/multi/ - - - - - - - - - - - - - - - - - - - - - - - - - pre-site - - - - - org.docbook - docbook-xml - 4.4 - runtime - - - org.apache.xmlgraphics - fop - 1.0 - - - - index.xml - false - - css/html.css - ${docbook.generatedDir}/ - - true - - - version - ${project.version} - - - - - - maven-javadoc-plugin - 2.7 - - true -
Spring Data Neo4j
- 1.6 - true - ${project.basedir}/src/main/javadoc - ${project.basedir}/src/main/javadoc/overview.html - ${project.basedir}/src/main/javadoc/spring-javadoc.css - - true - - http://static.springframework.org/spring/docs/3.0.x/javadoc-api - http://java.sun.com/javase/6/docs/api - -
- - - javadoc - - aggregate - - package - - -
- - maven-assembly-plugin - 2.2-beta-5 - false - - - ${project.basedir}/src/assembly/distribution.xml - - false - - - - distribution - - single - - package - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.4 - - - upload-dist - deploy - - - - - - - - - run - - - - - - org.springframework.build - org.springframework.build.aws.ant - 3.0.5.RELEASE - - - net.java.dev.jets3t - jets3t - 0.7.2 - - -
- - ${dist.finalName}
- - - repository.springsource.maven.bundles.release - SpringSource Maven Release Repository - http://repository.springsource.com/maven/bundles/release - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - jboss-legacy-repository - Old JBoss Public Repository - http://repository.jboss.org/maven2/ - - + + + + org.neo4j + neo4j + ${neo4j.version} + + + org.neo4j + neo4j-cypher + ${neo4j.version} + + + org.neo4j + neo4j-kernel + ${neo4j.version} + test + test-jar + + - central - http://uk.maven.org/maven2 + neo4j-public-release-repository + http://m2.neo4j.org/releases + + false + - jboss-legacy-repository - Old JBoss Public Repository - http://repository.jboss.org/maven2/ - - - - repository.source.maven.release - SpringSource Maven Release Repository - http://repository.springsource.com/maven/bundles/release - - - jboss-repository - JBoss Public Repository - http://repository.jboss.org/nexus/content/groups/public-jboss + tinkerpop-repository + http://tinkerpop.com/maven2 + + false + -
+ + \ No newline at end of file diff --git a/spring-data-neo4j-aspects/pom.xml b/spring-data-neo4j-aspects/pom.xml index 8ce0a9f18..1e0ebb8aa 100644 --- a/spring-data-neo4j-aspects/pom.xml +++ b/spring-data-neo4j-aspects/pom.xml @@ -1,273 +1,197 @@ - + + 4.0.0 + + spring-data-neo4j-aspects + + Spring Data Neo4j AspectJ Advanced Mapping + Advanced Mapping support for Spring Data Neo4j + 2.2.0.BUILD-SNAPSHOT + org.springframework.data spring-data-neo4j-parent 2.2.0.BUILD-SNAPSHOT - ../spring-data-neo4j-parent/pom.xml + ../pom.xml - spring-data-neo4j-aspects - jar - Spring Data Neo4J Aspects - - http://www.springsource.org/spring-data/neo4j + + + 1.0.0.GA + + + org.springframework - spring-beans + spring-tx + ${spring} org.springframework - spring-tx + spring-context + ${spring} + + + org.springframework + spring-beans + ${spring} org.springframework spring-aspects + ${spring} org.springframework - spring-orm - - - - - joda-time - joda-time - true - - - org.springframework.data - spring-data-commons + spring-aop + ${spring} - org.springframework.data - spring-data-neo4j - - - org.springframework.data - spring-data-neo4j - ${project.version} - test-jar - test - - - - - org.slf4j - slf4j-api - compile - - - org.slf4j - slf4j-log4j12 - runtime - true - - - log4j - log4j - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - true - - - - javax.annotation - jsr250-api - true - - - - org.neo4j - neo4j-cypher - true - - - - org.neo4j - neo4j-spatial - true - - - - org.neo4j - server-api - true - - - - com.tinkerpop.blueprints - blueprints-core - true - - - com.tinkerpop.blueprints - blueprints-neo4j-graph - true - - - - com.tinkerpop.gremlin - gremlin-groovy - true - - - - org.mockito - mockito-all - - - - junit - junit - - - - org.aspectj - aspectjrt - ${aspectj.version} - - - - cglib - cglib - 2.2 - - - - org.neo4j - neo4j-kernel - test-jar - test - - - - commons-configuration - commons-configuration - - - - - org.hibernate.javax.persistence - hibernate-jpa-2.0-api - 1.0.0.Final - - - - - org.hibernate - hibernate-entitymanager - 3.5.5-Final - test - - - hsqldb - hsqldb - 1.8.0.10 - test + org.springframework + spring-core + ${spring} + + + commons-logging + commons-logging + + + + javax.validation validation-api - 1.0.0.GA + ${validation} + true + org.hibernate hibernate-validator - 4.0.2.GA + 4.2.0.Final test - + + + org.neo4j + neo4j-kernel + ${neo4j.version} + + + org.neo4j + neo4j-lucene-index + ${neo4j.version} + test + + + org.neo4j + neo4j-kernel + ${neo4j.version} + test + test-jar + + + + org.springframework.data + spring-data-neo4j + 2.2.0.BUILD-SNAPSHOT + + + org.springframework.data + spring-data-neo4j + 2.2.0.BUILD-SNAPSHOT + test-jar + test + + + + + org.hibernate.javax.persistence + hibernate-jpa-2.0-api + 1.0.0.Final + true + compile + + + + org.aspectj + aspectjrt + ${aspectj} + + + + cglib + cglib + 2.2 + + + + org.neo4j + neo4j-spatial + ${neo4j.spatial.version} + test + + + + org.neo4j + neo4j-cypher-dsl + ${neo4j-cypher-dsl.version} + test + + + + + com.tinkerpop.blueprints + blueprints-core + ${blueprints.version} + test + true + + + com.tinkerpop.blueprints + blueprints-neo4j-graph + ${blueprints.version} + + + org.neo4j + neo4j + + + test + true + + + + com.tinkerpop.gremlin + gremlin-groovy + ${gremlin.version} + true + test + + + + - org.codehaus.mojo - aspectj-maven-plugin - 1.2 - - - org.aspectj - aspectjrt - ${aspectj.version} - - - org.aspectj - aspectjtools - ${aspectj.version} - - - - src/main/java - src/test/java - - true - - - org.springframework - spring-aspects - - - 1.6 - 1.6 - + org.apache.maven.plugins + maven-compiler-plugin + 3.0 default-compile - - compile - + none - test-compile - - test-compile - + default-testCompile + none - - - org.apache.maven.plugins - maven-eclipse-plugin - 2.8 - - - 1.5 - - org.eclipse.ajdt.ui.ajnature - org.eclipse.jdt.core.javanature - org.springframework.ide.eclipse.core.springnature - - - org.apache.maven.plugins @@ -280,11 +204,64 @@ - - com.springsource.bundlor - com.springsource.bundlor.maven - + + org.codehaus.mojo + aspectj-maven-plugin + 1.4 + + + org.aspectj + aspectjrt + ${aspectj} + + + org.aspectj + aspectjtools + ${aspectj} + + + + + process-sources + + compile + test-compile + + + + + src/main/java + src/test/java + true + + + org.springframework + spring-aspects + + + ${source.level} + ${source.level} + ${source.level} + + + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.8 + + + 1.5 + + org.eclipse.ajdt.ui.ajnature + org.eclipse.jdt.core.javanature + org.springframework.ide.eclipse.core.springnature + + + - + + \ No newline at end of file diff --git a/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/FinderTests.java b/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/FinderTests.java index 49fea20cb..c4891a7e2 100644 --- a/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/FinderTests.java +++ b/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/FinderTests.java @@ -34,7 +34,7 @@ import java.util.*; import static java.util.Arrays.asList; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.*; -import static org.junit.internal.matchers.IsCollectionContaining.hasItems; +import static org.hamcrest.Matchers.*; import static org.neo4j.helpers.collection.IteratorUtil.asCollection; import static org.springframework.data.neo4j.aspects.Person.persistedPerson; diff --git a/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/GraphRepositoryTests.java b/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/GraphRepositoryTests.java index b60ad942a..194b6e1ec 100644 --- a/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/GraphRepositoryTests.java +++ b/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/GraphRepositoryTests.java @@ -39,8 +39,7 @@ import static java.util.Arrays.asList; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; -import static org.junit.internal.matchers.IsCollectionContaining.hasItem; -import static org.junit.internal.matchers.IsCollectionContaining.hasItems; +import static org.hamcrest.Matchers.*; import static org.neo4j.helpers.collection.IteratorUtil.addToCollection; import static org.neo4j.helpers.collection.IteratorUtil.asCollection; diff --git a/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/NodeEntityQueryTests.java b/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/NodeEntityQueryTests.java index 85dc17024..5fefbe12b 100644 --- a/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/NodeEntityQueryTests.java +++ b/spring-data-neo4j-aspects/src/test/java/org/springframework/data/neo4j/aspects/support/NodeEntityQueryTests.java @@ -32,7 +32,7 @@ import java.util.Map; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; -import static org.junit.internal.matchers.IsCollectionContaining.hasItems; +import static org.hamcrest.Matchers.*; /** * @author mh diff --git a/spring-data-neo4j-cross-store/pom.xml b/spring-data-neo4j-cross-store/pom.xml index 564df4f00..4fcaf0c83 100644 --- a/spring-data-neo4j-cross-store/pom.xml +++ b/spring-data-neo4j-cross-store/pom.xml @@ -1,191 +1,102 @@ + 4.0.0 + org.springframework.data spring-data-neo4j-parent 2.2.0.BUILD-SNAPSHOT - ../spring-data-neo4j-parent/pom.xml + ../pom.xml + spring-data-neo4j-cross-store - jar - Spring Data Neo4J Cross-Store Handling - - http://www.springsource.org/spring-data/neo4j + Spring Data Neo4j - Cross-Store Persistence Support + + + 1.0.0.Final + 3.6.10.Final + + - + + org.springframework spring-beans + ${spring} + + + commons-logging + commons-logging + + org.springframework spring-tx + ${spring} org.springframework spring-aspects + ${spring} org.springframework spring-orm + ${spring} - - - joda-time - joda-time - true - - - org.springframework.data - spring-data-commons - + org.springframework.data spring-data-neo4j-aspects + 2.2.0.BUILD-SNAPSHOT - + + org.springframework.data spring-data-neo4j-tx + 2.2.0.BUILD-SNAPSHOT org.springframework.data spring-data-neo4j + 2.2.0.BUILD-SNAPSHOT org.springframework.data spring-data-neo4j test-jar test - ${project.version} + 2.2.0.BUILD-SNAPSHOT - - - org.slf4j - slf4j-api - compile - - - org.slf4j - slf4j-log4j12 - runtime - true - - - log4j - log4j - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - true - - - - javax.annotation - jsr250-api - true - - - - org.neo4j - neo4j-cypher - true - - - - org.neo4j - server-api - true - - - - com.tinkerpop.blueprints - blueprints-core - true - - - org.neo4j - neo4j - - - - - com.tinkerpop.blueprints - blueprints-neo4j-graph - true - - - - com.tinkerpop.gremlin - gremlin-groovy - true - - - - org.mockito - mockito-all - test - - - - junit - junit - org.aspectj aspectjrt - ${aspectj.version} + ${aspectj} - cglib cglib 2.2 - - org.neo4j - neo4j-kernel - test-jar - test - - - - commons-configuration - commons-configuration - - org.hibernate.javax.persistence hibernate-jpa-2.0-api - 1.0.0.Final + ${jpa} org.hibernate hibernate-entitymanager - 3.5.5-Final + ${hibernate} test @@ -198,6 +109,7 @@ javax.validation validation-api 1.0.0.GA + test org.hibernate @@ -205,28 +117,45 @@ 4.0.2.GA test + - + + + org.apache.maven.plugins + maven-compiler-plugin + 3.0 + + + default-compile + none + + + default-testCompile + none + + + org.codehaus.mojo aspectj-maven-plugin - 1.2 + 1.4 org.aspectj aspectjrt - ${aspectj.version} + ${aspectj} org.aspectj aspectjtools - ${aspectj.version} + ${aspectj} + process-sources compile test-compile @@ -240,31 +169,16 @@ org.springframework spring-aspects - - org.springframework.data - spring-data-neo4j-aspects - - - 1.6 - 1.6 + + org.springframework.data + spring-data-neo4j-aspects + + + ${source.level} + ${source.level} - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - - - com.springsource.bundlor - com.springsource.bundlor.maven - - - + + \ No newline at end of file diff --git a/spring-data-neo4j-distribution/pom.xml b/spring-data-neo4j-distribution/pom.xml new file mode 100644 index 000000000..ea681b58e --- /dev/null +++ b/spring-data-neo4j-distribution/pom.xml @@ -0,0 +1,41 @@ + + + + 4.0.0 + + org.springframework.data + spring-data-neo4j-distribution + 2.2.0.BUILD-SNAPSHOT + + pom + + Spring Data Neo4j - Distribution + Distribution build for Spring Data Neo4j + + + org.springframework.data + spring-data-neo4j-parent + 2.2.0.BUILD-SNAPSHOT + ../pom.xml + + + + ${basedir}/.. + spring-data-neo4j + SDNEO4J + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + org.codehaus.mojo + wagon-maven-plugin + + + + + \ No newline at end of file diff --git a/spring-data-neo4j-parent/.gitignore b/spring-data-neo4j-parent/.gitignore deleted file mode 100644 index b693b2c6e..000000000 --- a/spring-data-neo4j-parent/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -*.hprof* -ajcore* -.project -.classpath -.settings -.idea -*.log -.DS_Store -target -.springBeans -.ant-targets-build.xml -*.iml -*.ipr -*.iws - diff --git a/spring-data-neo4j-parent/license-header.txt b/spring-data-neo4j-parent/license-header.txt deleted file mode 100644 index 586c4388c..000000000 --- a/spring-data-neo4j-parent/license-header.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2011 the original author or authors. - -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. - diff --git a/spring-data-neo4j-parent/pom.xml b/spring-data-neo4j-parent/pom.xml deleted file mode 100644 index 3bf832fae..000000000 --- a/spring-data-neo4j-parent/pom.xml +++ /dev/null @@ -1,812 +0,0 @@ - - - 4.0.0 - org.springframework.data - spring-data-neo4j-parent - Spring Data Neo4j Parent - 2.2.0.BUILD-SNAPSHOT - pom - - http://www.springsource.org/spring-data/neo4j - - SpringSource - http://www.springsource.com - - - http://github.com/SpringSource/spring-data-neo4j - scm:git:git://github.com/SpringSource/spring-data-neo4j.git - scm:git:git://github.com/SpringSource/spring-data-neo4j.git - - - JIRA - https://jira.springsource.org/browse/DATAGRAPH - - - - Spring Batch Forum - http://forum.springsource.org/forumdisplay.php?f=80 - http://forum.springsource.org/forumdisplay.php?f=80 - - - - Bamboo - https://build.springsource.org/browse/SPRINGDATA - - - - - trisberg - Thomas Risberg - trisberg at vmware.com - SpringSource - http://www.SpringSource.com - - Project Admin - - -5 - - - mpollack - Mark Pollack - mpollack at vmware.com - SpringSource - http://www.SpringSource.com - - Project Admin - - -5 - - - mhunger - Michael Hunger - michael.hunger at neotechnology.com - Neo Technology - http://www.neotechnology.com - - Project Admin - Developer - - +1 - - - dmontag - David Montag - david.montag at neotechnology.com - Neo Technology - http://www.neotechnology.com - - Developer - - -7 - - - systay - Andres Taylor - andres at neotechnology.com - Neo Technology - http://www.neotechnology.com - - Developer - - +1 - - - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 - - Copyright 2010 the original author or authors. - - 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. - - - - - - UTF-8 - 4.8.1 - 1.2.15 - 1.8.4 - 1.6.1 - 3.0.7.RELEASE - 3.1.2.RELEASE - 1.5.0.RELEASE - 1.8.1 - 0.10 - 1.6.12 - 1.2 - 1.5 - 1.5 - 1.9.M04 - - - - fast - - true - - - - staging - - - spring-site-staging - file:///${java.io.tmpdir}/spring-data/data-neo4j/docs/${project.version} - - - spring-milestone-staging - file:///${java.io.tmpdir}/spring-data/data-neo4j/milestone - - - spring-snapshot-staging - file:///${java.io.tmpdir}/spring-data/data-neo4j/snapshot - - - - - milestone - - - spring-milestone - Spring Milestone Repository - s3://maven.springframework.org/milestone - - - - - central - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - sonatype-nexus-staging - Nexus Release Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - - - - - - - http://www.springsource.com/download/community - - static.springframework.org - - scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-data/data-neo4j/docs/${project.version} - - - - spring-release - Spring Release Repository - s3://maven.springframework.org/release - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - - - - - - - - org.springframework - spring-aop - ${org.springframework.version} - - - org.springframework - spring-aspects - ${org.springframework.version} - - - org.springframework - spring-beans - ${org.springframework.version} - - - org.springframework - spring-context - ${org.springframework.version} - - - org.springframework - spring-core - ${org.springframework.version} - - - commons-logging - commons-logging - - - - - org.springframework - spring-tx - ${org.springframework.version} - - - org.springframework - spring-orm - ${org.springframework.version} - - - org.springframework - spring-test - ${org.springframework.version} - test - - - - - joda-time - joda-time - 1.6 - true - - - org.springframework.data - spring-data-commons - ${data.commons.version} - - - org.springframework.data - spring-data-neo4j - ${project.version} - - - org.springframework.data - spring-data-neo4j-aspects - ${project.version} - - - org.springframework.data - spring-data-neo4j-tx - ${project.version} - - - - - org.slf4j - slf4j-api - ${org.slf4j.version} - compile - true - - - org.slf4j - jcl-over-slf4j - ${org.slf4j.version} - runtime - true - - - org.slf4j - slf4j-log4j12 - ${org.slf4j.version} - runtime - true - - - log4j - log4j - ${log4j.version} - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - true - - - - - com.tinkerpop.gremlin - gremlin-groovy - ${gremlin.version} - true - - - org.neo4j - neo4j - - - org.neo4j - neo4j-ha - - - org.neo4j - neo4j-management - - - - com.tinkerpop.blueprints - blueprints-sail-graph - - - - org.codehaus.groovy.maven - gmaven-plugin - - - - jline - jline - - - - - com.tinkerpop.blueprints - blueprints-neo4j-graph - ${blueprints.version} - - - org.neo4j - neo4j - - - org.neo4j - neo4j-ha - - - org.neo4j - neo4j-management - - - true - - - - com.tinkerpop.blueprints - blueprints-core - ${blueprints.version} - true - - - - javax.annotation - jsr250-api - 1.0 - true - - - - org.mockito - mockito-all - ${org.mockito.version} - test - - - - junit - junit - ${junit.version} - test - - - - - org.neo4j - neo4j - ${neo4j.version} - - - - org.neo4j - neo4j-kernel - ${neo4j.version} - test-jar - test - - - org.neo4j - server-api - ${neo4j.version} - provided - - - org.neo4j - neo4j-cypher - ${neo4j.version} - true - - - org.neo4j - neo4j-cypher-dsl - ${neo4j-cypher-dsl.version} - - - org.neo4j - neo4j-shell - ${neo4j.version} - true - - - org.neo4j - neo4j-udc - ${neo4j.version} - true - - - org.neo4j - neo4j-spatial - ${neo4j.spatial.version} - true - - - org.neo4j - neo4j - - - - - commons-configuration - commons-configuration - 1.6 - provided - - - - - - - log4j - log4j - ${log4j.version} - test - - - org.springframework - spring-test - test - - - - - - - - - org.springframework.build.aws - org.springframework.build.aws.maven - 3.1.0.RELEASE - - - - - ${project.basedir}/src/main/java - - **/* - - - **/*.java - **/*.aj - - - - ${project.basedir}/src/main/resources - - **/* - - - - - - ${project.basedir}/src/test/java - - **/* - - - **/*.java - - - - ${project.basedir}/src/test/resources - - **/* - - - **/*.java - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - - org.apache.maven.plugins - maven-surefire-plugin - 2.6 - - - org.apache.maven.plugins - maven-jar-plugin - 2.3.1 - - - org.apache.maven.plugins - maven-source-plugin - 2.0.4 - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8 - - - com.mycila.maven-license-plugin - maven-license-plugin - 1.9.0 - - - com.springsource.bundlor - com.springsource.bundlor.maven - 1.0.0.RELEASE - - - org.codehaus.mojo - aspectj-maven-plugin - 1.2 - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - -Xlint:all - true - false - - - - org.apache.maven.plugins - maven-surefire-plugin - - - once - true - - **/*Tests.java - **/*Test.java - - - **/Abstract*.java - **/*IntegrationTests.java - - junit:junit - - - - org.apache.maven.plugins - maven-jar-plugin - - true - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - package - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - javadoc - - jar - - deploy - - - - - com.mycila.maven-license-plugin - maven-license-plugin - - - check-licenses - - initialize - - format - - - - - true -
${basedir}/../spring-data-neo4j-parent/license-header.txt
- - src/**/*.java - src/**/*.js - src/**/*.scala - - - - **/lib/*.js - **/lib/**/*.js - **/javascript/vend/** - - - JAVADOC_STYLE - -
-
- - - com.springsource.bundlor - com.springsource.bundlor.maven - - false - - - - bundlor - - bundlor - - - - -
-
- - - spring-plugins - http://repo.springsource.org/plugins-release - - - - - spring-libs-milestone - http://repo.springsource.org/libs-milestone - - - spring-libs-snapshot - http://repo.springsource.org/libs-snapshot - - - tinkerpop-repository - http://tinkerpop.com/maven2 - - false - - - - jboss-repository - http://repository.jboss.org/nexus/content/groups/public-jboss - - false - - - - neo4j-public-release-repository - http://m2.neo4j.org/releases - - false - - - - neo4j-public-snapshot-repository - http://m2.neo4j.org/snapshots - - true - - - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.1 - - false - - - - -
diff --git a/spring-data-neo4j-rest/pom.xml b/spring-data-neo4j-rest/pom.xml index 14a730e2d..691006c40 100644 --- a/spring-data-neo4j-rest/pom.xml +++ b/spring-data-neo4j-rest/pom.xml @@ -1,29 +1,90 @@ - - 4.0.0 - - org.springframework.data - spring-data-neo4j-parent - 2.2.0.BUILD-SNAPSHOT - ../spring-data-neo4j-parent/pom.xml - - spring-data-neo4j-rest - jar + + + 4.0.0 + + spring-data-neo4j-rest + + Spring Data Neo4j Rest Binding + pring Data Neo4j Wrapper for the Neo4j REST API, provides a Graph Database proxy for the remote invocation. 2.2.0.BUILD-SNAPSHOT - Spring Data Neo4j REST Wrapper - - http://www.springsource.org/spring-data/neo4j - + + + org.springframework.data + spring-data-neo4j-parent + 2.2.0.BUILD-SNAPSHOT + ../pom.xml + + + + 1.0.0.GA 1.4 1.8.1 - + - + + + + + org.springframework + spring-tx + ${spring} + + + org.springframework + spring-context + ${spring} + + + org.springframework + spring-beans + ${spring} + + + org.springframework + spring-aspects + ${spring} + + + org.springframework + spring-aop + ${spring} + + + org.springframework + spring-core + ${spring} + + + commons-logging + commons-logging + + + + + + org.neo4j + neo4j-kernel + ${neo4j.version} + + + org.neo4j + neo4j-lucene-index + ${neo4j.version} + test + + + org.neo4j + neo4j-kernel + ${neo4j.version} + test + test-jar + org.springframework.data spring-data-neo4j + ${project.version} org.neo4j @@ -32,10 +93,21 @@ - - org.neo4j - neo4j - + + + javax.validation + validation-api + ${validation} + true + + + + org.hibernate + hibernate-validator + 4.2.0.Final + test + + org.neo4j neo4j-rest-graphdb @@ -51,12 +123,7 @@ - - org.neo4j - neo4j-shell - ${neo4j.version} - test - + org.neo4j.server.plugin neo4j-gremlin-plugin @@ -121,11 +188,13 @@ com.tinkerpop.blueprints blueprints-core + ${blueprints.version} true com.tinkerpop.blueprints blueprints-neo4j-graph + ${blueprints.version} true @@ -138,6 +207,7 @@ com.tinkerpop.gremlin gremlin-groovy + ${gremlin.version} true @@ -172,55 +242,16 @@ org.neo4j neo4j-kernel + ${neo4j.version} test-jar test - - - org.slf4j - slf4j-api - - - org.slf4j - jcl-over-slf4j - runtime - - - org.slf4j - slf4j-log4j12 - runtime - true - - - log4j - log4j - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - true - - - + org.springframework.data spring-data-neo4j-aspects + ${project.version} test @@ -240,19 +271,7 @@ test-jar - - org.hibernate - hibernate-validator - 4.0.2.GA - test - - - - junit - junit - test - - + com.sun.jersey jersey-server @@ -261,42 +280,10 @@ - - - - maven-jar-plugin - - - attach-test-jar - - test-jar - - - - - - maven-compiler-plugin - - 1.6 - 1.6 - - - - com.springsource.bundlor - com.springsource.bundlor.maven - 1.0.0.RELEASE - - true - - - - bundlor - - bundlor - - - - - - - + + + + + + + \ No newline at end of file diff --git a/spring-data-neo4j-tx/pom.xml b/spring-data-neo4j-tx/pom.xml index fc2264903..b6ae377ba 100644 --- a/spring-data-neo4j-tx/pom.xml +++ b/spring-data-neo4j-tx/pom.xml @@ -1,41 +1,66 @@ - + + 4.0.0 + + spring-data-neo4j-tx + + Spring Data Neo4j Transactions + External transaction manager support for Spring Data Neo4j + 2.2.0.BUILD-SNAPSHOT + org.springframework.data spring-data-neo4j-parent 2.2.0.BUILD-SNAPSHOT - ../spring-data-neo4j-parent/pom.xml + ../pom.xml - spring-data-neo4j-tx - jar - Neo4j Spring XA Transaction Integration - - http://neo4j.org + + + 1.0.0.GA + + + org.springframework - spring-beans + spring-tx + ${spring} org.springframework spring-context + ${spring} org.springframework - spring-tx + spring-beans + ${spring} org.springframework spring-aspects + ${spring} org.springframework spring-aop + ${spring} + org.springframework + spring-core + ${spring} + + + commons-logging + commons-logging + + + + + org.neo4j neo4j-kernel ${neo4j.version} @@ -67,37 +92,6 @@ true - - junit - junit - - - - org.aspectj - aspectjrt - ${aspectj.version} - - - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - - - log4j - log4j - - - - cglib - cglib - 2.2 - - org.hibernate.javax.persistence @@ -106,79 +100,71 @@ true compile - + + + org.aspectj + aspectjrt + ${aspectj} + + + + - - - org.codehaus.mojo - aspectj-maven-plugin - 1.2 - - - org.aspectj - aspectjrt - ${aspectj.version} - - - org.aspectj - aspectjtools - ${aspectj.version} - - - - - - - - org.springframework - spring-aspects - - - - 1.6 - 1.6 - - - - default-compile - - compile - - - - test-compile - - test-compile - - - - - - - org.apache.maven.plugins - maven-eclipse-plugin - 2.8 - - - 1.5 - - org.eclipse.ajdt.ui.ajnature - org.eclipse.jdt.core.javanature - org.springframework.ide.eclipse.core.springnature - - - - + + + org.codehaus.mojo + aspectj-maven-plugin + 1.4 + + + org.aspectj + aspectjrt + ${aspectj} + + + org.aspectj + aspectjtools + ${aspectj} + + + + + + compile + test-compile + + + + + true + + + org.springframework + spring-aspects + + + ${source.level} + ${source.level} + + + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.8 + + + 1.5 + + org.eclipse.ajdt.ui.ajnature + org.eclipse.jdt.core.javanature + org.springframework.ide.eclipse.core.springnature + + + + - + + \ No newline at end of file diff --git a/spring-data-neo4j/pom.xml b/spring-data-neo4j/pom.xml index 738734315..7eb544027 100644 --- a/spring-data-neo4j/pom.xml +++ b/spring-data-neo4j/pom.xml @@ -1,263 +1,212 @@ - + + 4.0.0 + + spring-data-neo4j + + Spring Data Neo4j + Neo4j support for Spring Data + 2.2.0.BUILD-SNAPSHOT + org.springframework.data spring-data-neo4j-parent 2.2.0.BUILD-SNAPSHOT - ../spring-data-neo4j-parent/pom.xml + ../pom.xml - spring-data-neo4j - jar - Spring Data Neo4j - - http://www.springsource.org/spring-data/neo4j - - 2.8.0 + + + 1.0.0.GA + + org.springframework - spring-beans + spring-tx + ${spring} org.springframework - spring-tx + spring-context + ${spring} + + + org.springframework + spring-beans + ${spring} org.springframework spring-aspects + ${spring} org.springframework - spring-orm + spring-core + ${spring} + + + commons-logging + commons-logging + + + + + org.springframework + spring-expression + ${spring} + + + + org.aspectj + aspectjrt + ${aspectj} - joda-time - joda-time - true + org.springframework.data + spring-data-commons + ${springdata.commons} - - org.springframework.data - spring-data-commons - - - - org.slf4j - slf4j-api - compile - - - org.slf4j - slf4j-log4j12 - runtime - true - - - log4j - log4j - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - true - - - - javax.annotation - jsr250-api + + com.mysema.querydsl + querydsl-lucene + ${querydsl} true - - - - org.mockito - mockito-all - test - - - - junit - junit - test - - - - org.aspectj - aspectjrt - ${aspectj.version} - - - cglib - cglib - 2.2 - - - - - org.neo4j - neo4j - - - org.neo4j - neo4j-cypher - true - - - org.neo4j - neo4j-cypher-dsl - - - org.neo4j - neo4j-shell - true - - - - org.neo4j - neo4j-kernel - test-jar - test - - - - org.neo4j - neo4j-ha - test - ${neo4j.version} - - - org.neo4j - neo4j-backup - - - ch.qos.logback - logback-classic - - - - - - org.neo4j - server-api - true - - - - - com.mysema.querydsl - querydsl-core - ${querydsl.version} - true - - - com.mysema.querydsl - querydsl-lucene - ${querydsl.version} - true org.apache.lucene lucene-core - + + + + + com.mysema.querydsl + querydsl-apt + ${querydsl} + provided + + + + javax.annotation + jsr250-api + 1.0 + true + + + + javax.el + el-api + ${cdi} + test + + + + + javax.validation + validation-api + ${validation} + true + + + + org.hibernate + hibernate-validator + 4.2.0.Final + test + + + + joda-time + joda-time + ${jodatime} + test + + - com.mysema.querydsl - querydsl-apt - ${querydsl.version} - provided + org.neo4j + neo4j-cypher-dsl + ${neo4j-cypher-dsl.version} - com.tinkerpop.blueprints - blueprints-core - true + org.neo4j + neo4j-spatial + ${neo4j.spatial.version} + true + + + org.neo4j + neo4j + + + org.neo4j + graph-collections + + - com.tinkerpop.blueprints - blueprints-neo4j-graph + org.neo4j + neo4j-graph-collections + ${neo4j.graph-collections.version} + true org.neo4j neo4j - true - - com.tinkerpop.gremlin - gremlin-groovy - true - - - - commons-configuration - commons-configuration - - - - org.neo4j - neo4j-spatial + server-api + ${neo4j.version} + provided + + + commons-configuration + commons-configuration + 1.6 + provided + + + + + com.tinkerpop.blueprints + blueprints-core + ${blueprints.version} + true + + + com.tinkerpop.blueprints + blueprints-neo4j-graph + ${blueprints.version} + + + org.neo4j + neo4j + + true - - - org.hibernate.javax.persistence - hibernate-jpa-2.0-api - 1.0.0.Final + + com.tinkerpop.gremlin + gremlin-groovy + ${gremlin.version} true - - - - - org.hibernate - hibernate-entitymanager - 3.5.5-Final - test - - - hsqldb - hsqldb - 1.8.0.10 - test - - - javax.validation - validation-api - 1.0.0.GA - - - org.hibernate - hibernate-validator - 4.0.2.GA - test - - + + + @@ -271,38 +220,33 @@ + - com.springsource.bundlor - com.springsource.bundlor.maven + com.mysema.maven + maven-apt-plugin + 1.0.4 + + + com.mysema.querydsl + querydsl-apt + ${querydsl} + + + + + generate-test-sources + + test-process + + + target/generated-test-sources + org.springframework.data.neo4j.querydsl.SDNAnnotationProcessor + + + - - com.mysema.maven - maven-apt-plugin - 1.0.2 - - org.springframework.data.neo4j.querydsl.SDNAnnotationProcessor - - - - test-sources - generate-test-sources - - test-process - - - target/generated-test-sources/querydsl - - - - - - - + + + \ No newline at end of file diff --git a/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/index/IndexProviderImpl.java b/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/index/IndexProviderImpl.java index ca9f463b3..9d566a121 100644 --- a/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/index/IndexProviderImpl.java +++ b/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/index/IndexProviderImpl.java @@ -104,7 +104,9 @@ public class IndexProviderImpl implements IndexProvider { return getIndex(declaringType, indexName, IndexType.SIMPLE); } String defaultIndexName = customizeIndexName(Indexed.Name.get(level, declaringType, null, instanceType.getClass()), instanceType); - if (providedIndexName==null || providedIndexName.equals(defaultIndexName)) throw new IllegalStateException("Index name for "+property+" must differ from the default name: "+defaultIndexName); + if (providedIndexName==null || providedIndexName.equals(defaultIndexName)) { + throw new IllegalStateException("Index name for "+property+" must differ from the default name: "+defaultIndexName); + } return getIndex(declaringType, indexName, property.getIndexInfo().getIndexType()); } diff --git a/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/mapping/Neo4jPersistentEntityImpl.java b/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/mapping/Neo4jPersistentEntityImpl.java index 50720ba17..646051af1 100644 --- a/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/mapping/Neo4jPersistentEntityImpl.java +++ b/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/support/mapping/Neo4jPersistentEntityImpl.java @@ -20,6 +20,7 @@ import org.neo4j.graphdb.Node; import org.neo4j.graphdb.PropertyContainer; import org.neo4j.graphdb.Relationship; import org.springframework.data.mapping.Association; +import org.springframework.data.mapping.PropertyHandler; import org.springframework.data.mapping.model.BasicPersistentEntity; import org.springframework.data.mapping.model.MappingException; import org.springframework.data.neo4j.annotation.*; @@ -73,6 +74,15 @@ public class Neo4jPersistentEntityImpl extends BasicPersistentEntity() { + Neo4jPersistentProperty unique = null; + public void doWithPersistentProperty(Neo4jPersistentProperty persistentProperty) { + if (persistentProperty.isUnique()) { + if (unique!=null) throw new MappingException("Duplicate unique property " + persistentProperty.getName()+ ", " + unique.getName() + " has already been defined. Only one unique property is allowed per type"); + unique = persistentProperty; + } + } + }); } public boolean useShortNames() { @@ -157,8 +167,9 @@ public class Neo4jPersistentEntityImpl extends BasicPersistentEntity>either(equalTo(asSet(probabilityTheory, geometry))).or(equalTo(asSet(statistics, calculus))))); + assertThat(student.getDislikedCourses(), is(Matchers.>either(equalTo(asSet(probabilityTheory, geometry))).or(equalTo(asSet(statistics, calculus))))); } /** @@ -462,8 +459,8 @@ public class RelatedToTests { assertThat(getRelationshipNames(template, steveJobs), is(equalTo(asSet("experience")))); steveJobs = linkedin.findOne(steveJobs.getId()); - assertThat(steveJobs.getExperience(), is(either(equalTo(asSet(college, sabbatical))).or(equalTo(asSet(college, sabbatical, atari, apple))))); - assertThat(steveJobs.getJobs(), is(either(equalTo(Collections.emptySet())).or(equalTo(asSet(atari, apple))))); + assertThat(steveJobs.getExperience(), is(Matchers.>either(equalTo(asSet(college, sabbatical))).or(equalTo(asSet(college, sabbatical, atari, apple))))); + assertThat(steveJobs.getJobs(), is(Matchers.>either(equalTo(Collections.emptySet())).or(equalTo(asSet(atari, apple))))); } @Test diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/lifecycle/SaveEventTests.java b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/lifecycle/SaveEventTests.java index 7f9ec541c..9c75348d6 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/lifecycle/SaveEventTests.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/lifecycle/SaveEventTests.java @@ -15,6 +15,8 @@ */ package org.springframework.data.neo4j.lifecycle; +import org.hamcrest.Matcher; +import org.hamcrest.Matchers; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -26,6 +28,7 @@ import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.neo4j.annotation.*; +import org.springframework.data.neo4j.annotation.relatedto.Experience; import org.springframework.data.neo4j.config.EnableNeo4jRepositories; import org.springframework.data.neo4j.config.Neo4jConfiguration; import org.springframework.data.neo4j.support.Neo4jTemplate; @@ -39,11 +42,8 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.Set; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; -import static org.junit.matchers.JUnitMatchers.either; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; import static org.springframework.data.neo4j.SetHelper.asSet; @RelationshipEntity(type = "slew") @@ -184,7 +184,6 @@ public class SaveEventTests { @Bean ApplicationListener beforeSaveEventApplicationListener() { return new ApplicationListener() { - @Override public void onApplicationEvent(BeforeSaveEvent event) { entities.add(event.getEntity()); } @@ -256,8 +255,8 @@ public class SaveEventTests { assertThat(entities.size(), is(3)); assertThat(((FictionalCharacter) entities.get(0)).id, is(turin.id)); - assertThat(((Slaying) entities.get(1)).slayee.id, is(either(equalTo(beleg.id)).or(equalTo(brandir.id)))); - assertThat(((Slaying) entities.get(2)).slayee.id, is(either(equalTo(beleg.id)).or(equalTo(brandir.id)))); + assertThat(((Slaying) entities.get(1)).slayee.id, is(Matchers.either(equalTo(beleg.id)).or(equalTo(brandir.id)))); + assertThat(((Slaying) entities.get(2)).slayee.id, is(Matchers.either(equalTo(beleg.id)).or(equalTo(brandir.id)))); } @Test diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/CypherDslRepositoryTests.java b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/CypherDslRepositoryTests.java index 88ac21209..7f7ebe571 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/CypherDslRepositoryTests.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/CypherDslRepositoryTests.java @@ -43,7 +43,7 @@ import java.util.Map; import static java.util.Arrays.asList; import static org.junit.Assert.assertThat; -import static org.junit.internal.matchers.IsCollectionContaining.hasItems; +import static org.hamcrest.Matchers.*; import static org.neo4j.helpers.collection.MapUtil.map; /** diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/GraphRepositoryTests.java b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/GraphRepositoryTests.java index 1b2ecfbd5..00538daa5 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/GraphRepositoryTests.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/GraphRepositoryTests.java @@ -58,10 +58,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import static java.util.Arrays.asList; -import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; -import static org.junit.internal.matchers.IsCollectionContaining.hasItem; -import static org.junit.internal.matchers.IsCollectionContaining.hasItems; import static org.neo4j.helpers.collection.IteratorUtil.addToCollection; import static org.neo4j.helpers.collection.IteratorUtil.asCollection; import static org.neo4j.helpers.collection.MapUtil.map; diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/SpatialGraphRepositoryTests.java b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/SpatialGraphRepositoryTests.java index cf575f29d..943e0d61b 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/SpatialGraphRepositoryTests.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/SpatialGraphRepositoryTests.java @@ -39,7 +39,7 @@ import org.springframework.transaction.support.TransactionCallbackWithoutResult; import org.springframework.transaction.support.TransactionTemplate; import static org.junit.Assert.assertThat; -import static org.junit.internal.matchers.IsCollectionContaining.hasItems; +import static org.hamcrest.Matchers.*; import static org.neo4j.helpers.collection.IteratorUtil.asCollection; @RunWith(SpringJUnit4ClassRunner.class) diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/support/EntityNeo4jTemplateTests.java b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/support/EntityNeo4jTemplateTests.java index c4b2c385d..d270f6cec 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/support/EntityNeo4jTemplateTests.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/support/EntityNeo4jTemplateTests.java @@ -17,7 +17,7 @@ package org.springframework.data.neo4j.support; import org.junit.Before; import org.junit.Test; -import org.junit.internal.matchers.IsCollectionContaining; + import org.junit.runner.RunWith; import org.mockito.Mockito; import org.neo4j.graphdb.*; @@ -51,7 +51,7 @@ import org.springframework.transaction.support.TransactionTemplate; import java.util.*; import static org.junit.Assert.*; -import static org.junit.internal.matchers.IsCollectionContaining.hasItems; +import static org.hamcrest.Matchers.*; import static org.neo4j.graphdb.Direction.OUTGOING; import static org.neo4j.helpers.collection.IteratorUtil.asCollection; import static org.neo4j.helpers.collection.IteratorUtil.first; @@ -317,7 +317,7 @@ public class EntityNeo4jTemplateTests extends EntityTestBase { assertEquals(friendship.getId(),(Long)getNodeState(testTeam.david).getSingleRelationship(KNOWS, OUTGOING).getId()); final List friendships = IteratorUtil.addToCollection(friendshipRepository.findAll(), new ArrayList()); assertEquals(2,friendships.size()); - assertThat(friendships, IsCollectionContaining.hasItems(testTeam.friendShip, friendship)); + assertThat(friendships, hasItems(testTeam.friendShip, friendship)); } @Test @Transactional diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/unique/UniqueEntityTests.java b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/unique/UniqueEntityTests.java index 27d975164..3524d0dd1 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/unique/UniqueEntityTests.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/unique/UniqueEntityTests.java @@ -30,6 +30,7 @@ import org.springframework.data.neo4j.unique.repository.ClubRepository; import org.springframework.data.neo4j.unique.repository.InvalidClubRepository; import org.springframework.data.neo4j.unique.repository.UniqueClubRepository; import org.springframework.data.neo4j.unique.repository.UniqueNumericIdClubRepository; +import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional;