diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 6c5d559a8a..e8f632af23 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -6,7 +6,6 @@ Make sure that:
-->
- [ ] You have read the [Spring Data contribution guidelines](https://github.com/spring-projects/spring-data-build/blob/master/CONTRIBUTING.adoc).
-- [ ] There is a ticket in the bug tracker for the project in our [JIRA](https://jira.spring.io/browse/DATAMONGO).
- [ ] You use the code formatters provided [here](https://github.com/spring-projects/spring-data-build/tree/master/etc/ide) and have them applied to your changes. Don’t submit any formatting related changes.
- [ ] You submit test cases (unit or integration tests) that back your changes.
- [ ] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).
diff --git a/.github/dco.yml b/.github/dco.yml
new file mode 100644
index 0000000000..0c4b142e9a
--- /dev/null
+++ b/.github/dco.yml
@@ -0,0 +1,2 @@
+require:
+ members: false
diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml
new file mode 100644
index 0000000000..a5f764579a
--- /dev/null
+++ b/.github/workflows/project.yml
@@ -0,0 +1,40 @@
+# GitHub Actions to automate GitHub issues for Spring Data Project Management
+
+name: Spring Data GitHub Issues
+
+on:
+ issues:
+ types: [opened, edited, reopened]
+ issue_comment:
+ types: [created]
+ pull_request_target:
+ types: [opened, edited, reopened]
+
+jobs:
+ Inbox:
+ runs-on: ubuntu-latest
+ if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request == null && !contains(join(github.event.issue.labels.*.name, ', '), 'dependency-upgrade') && !contains(github.event.issue.title, 'Release ')
+ steps:
+ - name: Create or Update Issue Card
+ uses: actions/add-to-project@v1.0.2
+ with:
+ project-url: https://github.com/orgs/spring-projects/projects/25
+ github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
+ Pull-Request:
+ runs-on: ubuntu-latest
+ if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request != null
+ steps:
+ - name: Create or Update Pull Request Card
+ uses: actions/add-to-project@v1.0.2
+ with:
+ project-url: https://github.com/orgs/spring-projects/projects/25
+ github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
+ Feedback-Provided:
+ runs-on: ubuntu-latest
+ if: github.repository_owner == 'spring-projects' && github.event_name == 'issue_comment' && github.event.action == 'created' && github.actor != 'spring-projects-issues' && github.event.pull_request == null && github.event.issue.state == 'open' && contains(toJSON(github.event.issue.labels), 'waiting-for-feedback')
+ steps:
+ - name: Update Project Card
+ uses: actions/add-to-project@v1.0.2
+ with:
+ project-url: https://github.com/orgs/spring-projects/projects/25
+ github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
diff --git a/.gitignore b/.gitignore
index be372b6209..27b7a78896 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,4 +15,9 @@ src/ant/.ant-targets-upload-dist.xml
atlassian-ide-plugin.xml
/.gradle/
/.idea/
-*.graphml
\ No newline at end of file
+*.graphml
+build/
+node_modules
+node
+package-lock.json
+.mvn/.develocity
diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
new file mode 100644
index 0000000000..e0857eaa25
--- /dev/null
+++ b/.mvn/extensions.xml
@@ -0,0 +1,8 @@
+
+
+
+ io.spring.develocity.conventions
+ develocity-conventions-maven-extension
+ 0.0.22
+
+
diff --git a/.mvn/jvm.config b/.mvn/jvm.config
new file mode 100644
index 0000000000..e27f6e8f5e
--- /dev/null
+++ b/.mvn/jvm.config
@@ -0,0 +1,14 @@
+--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
+--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
+--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
+--add-opens=java.base/java.util=ALL-UNNAMED
+--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
+--add-opens=java.base/java.text=ALL-UNNAMED
+--add-opens=java.desktop/java.awt.font=ALL-UNNAMED
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100755
index 0000000000..01e6799737
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100755
index 0000000000..5f3193b363
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,2 @@
+#Thu Nov 07 09:47:19 CET 2024
+distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 5b8e003615..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-language: java
-
-jdk:
- - oraclejdk8
-
-before_script:
- - mongod --version
- - |-
- echo "replication:
- replSetName: rs0" | sudo tee -a /etc/mongod.conf
- - sudo service mongod restart
- - sleep 20
- - |-
- mongo --eval "rs.initiate({_id: 'rs0', members:[{_id: 0, host: '127.0.0.1:27017'}]});"
- - sleep 15
-
-services:
- - mongodb
-
-env:
- matrix:
- - PROFILE=ci
- - PROFILE=mongo36-next
-
-# Current MongoDB version is 2.4.2 as of 2016-04, see https://github.com/travis-ci/travis-ci/issues/3694
-# apt-get starts a MongoDB instance so it's not started using before_script
-addons:
- apt:
- sources:
- - mongodb-3.4-precise
- packages:
- - mongodb-org-server
- - mongodb-org-shell
- - oracle-java8-installer
-
-sudo: false
-
-cache:
- directories:
- - $HOME/.m2
-
-install:
- - |-
- mongo admin --eval "db.adminCommand({setFeatureCompatibilityVersion: '3.4'});"
-
-script: "mvn clean dependency:list test -P${PROFILE} -Dsort"
diff --git a/CI.adoc b/CI.adoc
new file mode 100644
index 0000000000..057100a955
--- /dev/null
+++ b/CI.adoc
@@ -0,0 +1,43 @@
+= Continuous Integration
+
+image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-mongodb%2Fmain&subject=Moore%20(main)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-mongodb/]
+image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-mongodb%2F2.1.x&subject=Lovelace%20(2.1.x)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-mongodb/]
+image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-mongodb%2F1.10.x&subject=Ingalls%20(1.10.x)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-mongodb/]
+
+== Running CI tasks locally
+
+Since this pipeline is purely Docker-based, it's easy to:
+
+* Debug what went wrong on your local machine.
+* Test out a a tweak to your test routine before sending it out.
+* Experiment against a new image before submitting your pull request.
+
+All of these use cases are great reasons to essentially run what the CI server does on your local machine.
+
+IMPORTANT: To do this you must have Docker installed on your machine.
+
+1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-mongodb-github springci/spring-data-openjdk17-with-mongodb-5.0.3:latest /bin/bash`
++
+This will launch the Docker image and mount your source code at `spring-data-mongodb-github`.
++
+2. `cd spring-data-mongodb-github`
++
+Next, run the tests from inside the container:
++
+3. `./mvnw clean dependency:list test -Dsort -Dbundlor.enabled=false -B` (or with whatever profile you need to test out)
+
+Since the container is binding to your source, you can make edits from your IDE and continue to run build jobs.
+
+If you need to package things up, do this:
+
+1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-mongodb-github springci/spring-data-openjdk8-with-mongodb-4.0:latest /bin/bash`
++
+This will launch the Docker image and mount your source code at `spring-data-mongodb-github`.
++
+2. `cd spring-data-mongodb-github`
++
+Next, package things from inside the container doing this:
++
+3. `./mvnw clean dependency:list package -Dsort -Dbundlor.enabled=false -B`
+
+NOTE: Docker containers can eat up disk space fast! From time to time, run `docker system prune` to clean out old images.
diff --git a/CODE_OF_CONDUCT.adoc b/CODE_OF_CONDUCT.adoc
deleted file mode 100644
index f64fb1b7a5..0000000000
--- a/CODE_OF_CONDUCT.adoc
+++ /dev/null
@@ -1,27 +0,0 @@
-= Contributor Code of Conduct
-
-As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
-
-We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery
-* Personal attacks
-* Trolling or insulting/derogatory comments
-* Public or private harassment
-* Publishing other's private information, such as physical or electronic addresses,
- without explicit permission
-* Other unethical or unprofessional conduct
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at spring-code-of-conduct@pivotal.io.
-All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
-Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
-
-This Code of Conduct is adapted from the http://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at http://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/].
\ No newline at end of file
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
index f007591467..740e8bd0bb 100644
--- a/CONTRIBUTING.adoc
+++ b/CONTRIBUTING.adoc
@@ -1,3 +1,3 @@
= Spring Data contribution guidelines
-You find the contribution guidelines for Spring Data projects https://github.com/spring-projects/spring-data-build/blob/master/CONTRIBUTING.adoc[here].
+You find the contribution guidelines for Spring Data projects https://github.com/spring-projects/spring-data-build/blob/main/CONTRIBUTING.adoc[here].
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000000..0e83b47e2f
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,216 @@
+def p = [:]
+node {
+ checkout scm
+ p = readProperties interpolate: true, file: 'ci/pipeline.properties'
+}
+
+pipeline {
+ agent none
+
+ triggers {
+ pollSCM 'H/10 * * * *'
+ upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS)
+ }
+
+ options {
+ disableConcurrentBuilds()
+ buildDiscarder(logRotator(numToKeepStr: '14'))
+ }
+
+ stages {
+ stage("Docker images") {
+ parallel {
+ stage('Publish JDK (Java 17) + MongoDB 6.0') {
+ when {
+ anyOf {
+ changeset "ci/openjdk17-mongodb-6.0/**"
+ changeset "ci/pipeline.properties"
+ }
+ }
+ agent { label 'data' }
+ options { timeout(time: 30, unit: 'MINUTES') }
+
+ steps {
+ script {
+ def image = docker.build("springci/spring-data-with-mongodb-6.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.6.0.version']} ci/openjdk17-mongodb-6.0/")
+ docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
+ image.push()
+ }
+ }
+ }
+ }
+ stage('Publish JDK (Java 17) + MongoDB 7.0') {
+ when {
+ anyOf {
+ changeset "ci/openjdk17-mongodb-7.0/**"
+ changeset "ci/pipeline.properties"
+ }
+ }
+ agent { label 'data' }
+ options { timeout(time: 30, unit: 'MINUTES') }
+
+ steps {
+ script {
+ def image = docker.build("springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.7.0.version']} ci/openjdk17-mongodb-7.0/")
+ docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
+ image.push()
+ }
+ }
+ }
+ }
+ stage('Publish JDK (Java.next) + MongoDB 8.0') {
+ when {
+ anyOf {
+ changeset "ci/openjdk17-mongodb-8.0/**"
+ changeset "ci/pipeline.properties"
+ }
+ }
+ agent { label 'data' }
+ options { timeout(time: 30, unit: 'MINUTES') }
+
+ steps {
+ script {
+ def image = docker.build("springci/spring-data-with-mongodb-8.0:${p['java.next.tag']}", "--build-arg BASE=${p['docker.java.next.image']} --build-arg MONGODB=${p['docker.mongodb.8.0.version']} ci/openjdk23-mongodb-8.0/")
+ docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
+ image.push()
+ }
+ }
+ }
+ }
+ }
+ }
+
+ stage("test: baseline (main)") {
+ when {
+ beforeAgent(true)
+ anyOf {
+ branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
+ not { triggeredBy 'UpstreamCause' }
+ }
+ }
+ agent {
+ label 'data'
+ }
+ options { timeout(time: 30, unit: 'MINUTES') }
+ environment {
+ ARTIFACTORY = credentials("${p['artifactory.credentials']}")
+ DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
+ }
+ steps {
+ script {
+ docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
+ docker.image("springci/spring-data-with-mongodb-6.0:${p['java.main.tag']}").inside(p['docker.java.inside.docker']) {
+ sh 'ci/start-replica.sh'
+ sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
+ "./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-mongodb clean dependency:list test -Dsort -U -B"
+ }
+ }
+ }
+ }
+ }
+
+ stage("Test other configurations") {
+ when {
+ beforeAgent(true)
+ allOf {
+ branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
+ not { triggeredBy 'UpstreamCause' }
+ }
+ }
+ parallel {
+ stage("test: MongoDB 7.0 (main)") {
+ agent {
+ label 'data'
+ }
+ options { timeout(time: 30, unit: 'MINUTES') }
+ environment {
+ ARTIFACTORY = credentials("${p['artifactory.credentials']}")
+ DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
+ }
+ steps {
+ script {
+ docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
+ docker.image("springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}").inside(p['docker.java.inside.docker']) {
+ sh 'ci/start-replica.sh'
+ sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
+ "./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-mongodb clean dependency:list test -Dsort -U -B"
+ }
+ }
+ }
+ }
+ }
+
+ stage("test: MongoDB 8.0") {
+ agent {
+ label 'data'
+ }
+ options { timeout(time: 30, unit: 'MINUTES') }
+ environment {
+ ARTIFACTORY = credentials("${p['artifactory.credentials']}")
+ DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
+ }
+ steps {
+ script {
+ docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
+ docker.image("springci/spring-data-with-mongodb-8.0:${p['java.next.tag']}").inside(p['docker.java.inside.docker']) {
+ sh 'ci/start-replica.sh'
+ sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
+ "./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-mongodb clean dependency:list test -Dsort -U -B"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ stage('Release to artifactory') {
+ when {
+ beforeAgent(true)
+ anyOf {
+ branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
+ not { triggeredBy 'UpstreamCause' }
+ }
+ }
+ agent {
+ label 'data'
+ }
+ options { timeout(time: 20, unit: 'MINUTES') }
+ environment {
+ ARTIFACTORY = credentials("${p['artifactory.credentials']}")
+ DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
+ }
+ steps {
+ script {
+ docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
+ docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
+ sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
+ "./mvnw -s settings.xml -Pci,artifactory " +
+ "-Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root " +
+ "-Dartifactory.server=${p['artifactory.url']} " +
+ "-Dartifactory.username=${ARTIFACTORY_USR} " +
+ "-Dartifactory.password=${ARTIFACTORY_PSW} " +
+ "-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " +
+ "-Dartifactory.build-name=spring-data-mongodb " +
+ "-Dartifactory.build-number=spring-data-mongodb-${BRANCH_NAME}-build-${BUILD_NUMBER} " +
+ "-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-mongodb " +
+ "-Dmaven.test.skip=true clean deploy -U -B"
+ }
+ }
+ }
+ }
+ }
+ }
+
+ post {
+ changed {
+ script {
+ emailext(
+ subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}",
+ mimeType: 'text/html',
+ recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']],
+ body: "${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}")
+ }
+ }
+ }
+}
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000000..ff77379631
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ https://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ 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
+
+ https://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/README.adoc b/README.adoc
new file mode 100644
index 0000000000..61b956fbfc
--- /dev/null
+++ b/README.adoc
@@ -0,0 +1,231 @@
+image:https://spring.io/badges/spring-data-mongodb/ga.svg[Spring Data MongoDB,link=https://spring.io/projects/spring-data-mongodb#quick-start] image:https://spring.io/badges/spring-data-mongodb/snapshot.svg[Spring Data MongoDB,link=https://spring.io/projects/spring-data-mongodb#quick-start]
+
+= Spring Data MongoDB image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-mongodb%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-mongodb/] image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?search.rootProjectNames=Spring Data MongoDB"]
+
+The primary goal of the https://spring.io/projects/spring-data[Spring Data] project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
+
+The Spring Data MongoDB project aims to provide a familiar and consistent Spring-based programming model for new datastores while retaining store-specific features and capabilities.
+The Spring Data MongoDB project provides integration with the MongoDB document database.
+Key functional areas of Spring Data MongoDB are a POJO centric model for interacting with a MongoDB `+Document+` and easily writing a repository style data access layer.
+
+[[code-of-conduct]]
+== Code of Conduct
+
+This project is governed by the https://github.com/spring-projects/.github/blob/e3cc2ff230d8f1dca06535aa6b5a4a23815861d4/CODE_OF_CONDUCT.md[Spring Code of Conduct]. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
+
+[[getting-started]]
+== Getting Started
+
+Here is a quick teaser of an application using Spring Data Repositories in Java:
+
+[source,java]
+----
+public interface PersonRepository extends CrudRepository {
+
+ List findByLastname(String lastname);
+
+ List findByFirstnameLike(String firstname);
+}
+
+@Service
+public class MyService {
+
+ private final PersonRepository repository;
+
+ public MyService(PersonRepository repository) {
+ this.repository = repository;
+ }
+
+ public void doWork() {
+
+ repository.deleteAll();
+
+ Person person = new Person();
+ person.setFirstname("Oliver");
+ person.setLastname("Gierke");
+ repository.save(person);
+
+ List lastNameResults = repository.findByLastname("Gierke");
+ List firstNameResults = repository.findByFirstnameLike("Oli*");
+ }
+}
+
+@Configuration
+@EnableMongoRepositories
+class ApplicationConfig extends AbstractMongoClientConfiguration {
+
+ @Override
+ protected String getDatabaseName() {
+ return "springdata";
+ }
+}
+----
+
+[[maven-configuration]]
+=== Maven configuration
+
+Add the Maven dependency:
+
+[source,xml]
+----
+
+ org.springframework.data
+ spring-data-mongodb
+ ${version}
+
+----
+
+If you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository
+and declare the appropriate dependency version.
+
+[source,xml]
+----
+
+ org.springframework.data
+ spring-data-mongodb
+ ${version}-SNAPSHOT
+
+
+
+ spring-snapshot
+ Spring Snapshot Repository
+ https://repo.spring.io/snapshot
+
+----
+
+[[upgrading]]
+== Upgrading
+
+Instructions for how to upgrade from earlier versions of Spring Data are provided on the project https://github.com/spring-projects/spring-data-commons/wiki[wiki].
+Follow the links in the https://github.com/spring-projects/spring-data-commons/wiki#release-notes[release notes section] to find the version that you want to upgrade to.
+
+[[getting-help]]
+== Getting Help
+
+Having trouble with Spring Data? We’d love to help!
+
+* Check the
+https://docs.spring.io/spring-data/mongodb/reference/[reference documentation], and https://docs.spring.io/spring-data/mongodb/docs/current/api/[Javadocs]
+* Learn the Spring basics – Spring Data builds on Spring Framework, check the https://spring.io[spring.io] web-site for a wealth of reference documentation.
+If you are just starting out with Spring, try one of the https://spring.io/guides[guides].
+* If you are upgrading, check out the https://docs.spring.io/spring-data/mongodb/docs/current/changelog.txt[changelog] for "`new and noteworthy`" features.
+* Ask a question - we monitor https://stackoverflow.com[stackoverflow.com] for questions tagged with https://stackoverflow.com/tags/spring-data[`spring-data-mongodb`].
+* Report bugs with Spring Data MongoDB at https://github.com/spring-projects/spring-data-mongodb/issues[github.com/spring-projects/spring-data-mongodb/issues].
+
+[[reporting-issues]]
+== Reporting Issues
+
+Spring Data uses Github as issue tracking system to record bugs and feature requests.
+If you want to raise an issue, please follow the recommendations below:
+
+* Before you log a bug, please search the https://github.com/spring-projects/spring-data-mongodb/issues[issue tracker] to see if someone has already reported the problem.
+* If the issue does not already exist, https://github.com/spring-projects/spring-data-mongodb/issues/new[create a new issue].
+* Please provide as much information as possible with the issue report, we like to know the version of Spring Data that you are using, the JVM version, Stacktrace, etc.
+* If you need to paste code, or include a stack trace use https://guides.github.com/features/mastering-markdown/[Markdown] code fences +++```+++.
+
+[[guides]]
+== Guides
+
+The https://spring.io/[spring.io] site contains several guides that show how to use Spring Data step-by-step:
+
+* https://spring.io/guides/gs/accessing-data-mongodb/[Accessing Data with MongoDB] is a very basic guide that shows you how to create a simple application and how to access data using repositories.
+* https://spring.io/guides/gs/accessing-mongodb-data-rest/[Accessing MongoDB Data with REST] is a guide to creating a REST web service exposing data stored in MongoDB through repositories.
+
+[[examples]]
+== Examples
+
+* https://github.com/spring-projects/spring-data-examples/[Spring Data Examples] contains example projects that explain specific features in more detail.
+
+[[building-from-source]]
+== Building from Source
+
+You do not need to build from source to use Spring Data. Binaries are available in https://repo.spring.io[repo.spring.io]
+and accessible from Maven using the Maven configuration noted <>.
+
+NOTE: Configuration for Gradle is similar to Maven.
+
+The best way to get started is by creating a Spring Boot project using MongoDB on https://start.spring.io[start.spring.io].
+Follow this https://start.spring.io/#type=maven-project&language=java&platformVersion=3.0.0&packaging=jar&jvmVersion=17&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&dependencies=data-mongodb[link]
+to build an imperative application and this https://start.spring.io/#type=maven-project&language=java&platformVersion=3.0.0&packaging=jar&jvmVersion=17&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&dependencies=data-mongodb-reactive[link]
+to build a reactive one.
+
+However, if you want to try out the latest and greatest, Spring Data MongoDB can be easily built with the https://github.com/takari/maven-wrapper[Maven wrapper]
+and minimally, JDK 17 (https://www.oracle.com/java/technologies/downloads/[JDK downloads]).
+
+In order to build Spring Data MongoDB, you will need to https://www.mongodb.com/try/download/community[download]
+and https://docs.mongodb.com/manual/installation/[install a MongoDB distribution].
+
+Once you have installed MongoDB, you need to start a MongoDB server. It is convenient to set an environment variable to
+your MongoDB installation directory (e.g. `MONGODB_HOME`).
+
+To run the full test suite, a https://docs.mongodb.com/manual/tutorial/deploy-replica-set/[MongoDB Replica Set]
+is required.
+
+To run the MongoDB server enter the following command from a command-line:
+
+[source,bash]
+----
+$ $MONGODB_HOME/bin/mongod --dbpath $MONGODB_HOME/runtime/data --ipv6 --port 27017 --replSet rs0
+...
+"msg":"Successfully connected to host"
+----
+
+Once the MongoDB server starts up, you should see the message (`msg`), "_Successfully connected to host_".
+
+Notice the `--dbpath` option to the `mongod` command. You can set this to anything you like, but in this case, we set
+the absolute path to a sub-directory (`runtime/data/`) under the MongoDB installation directory (in `$MONGODB_HOME`).
+
+You need to initialize the MongoDB replica set only once on the first time the MongoDB server is started.
+To initialize the replica set, start a mongo client:
+
+[source,bash]
+----
+$ $MONGODB_HOME/bin/mongo
+MongoDB server version: 6.0.0
+...
+----
+
+Then enter the following command:
+
+[source,bash]
+----
+mongo> rs.initiate({ _id: 'rs0', members: [ { _id: 0, host: '127.0.0.1:27017' } ] })
+----
+
+Finally, on UNIX-based system (for example, Linux or Mac OS X) you may need to adjust the `ulimit`.
+In case you need to, you can adjust the `ulimit` with the following command (32768 is just a recommendation):
+
+[source,bash]
+----
+$ ulimit -n 32768
+----
+
+You can use `ulimit -a` again to verify the `ulimit` for "_open files_" was set appropriately.
+
+Now you are ready to build Spring Data MongoDB. Simply enter the following `mvnw` (Maven Wrapper) command:
+
+[source,bash]
+----
+ $ ./mvnw clean install
+----
+
+If you want to build with the regular `mvn` command, you will need https://maven.apache.org/run-maven/index.html[Maven v3.8.0 or above].
+
+_Also see link:CONTRIBUTING.adoc[CONTRIBUTING.adoc] if you wish to submit pull requests, and in particular, please sign
+the https://cla.pivotal.io/sign/spring[Contributor’s Agreement] before your first non-trivial change._
+
+=== Building reference documentation
+
+Building the documentation builds also the project without running tests.
+
+[source,bash]
+----
+ $ ./mvnw clean install -Pantora
+----
+
+The generated documentation is available from `target/antora/site/index.html`.
+
+[[license]]
+== License
+
+Spring Data MongoDB is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].
diff --git a/README.md b/README.md
deleted file mode 100644
index 1425c0827d..0000000000
--- a/README.md
+++ /dev/null
@@ -1,150 +0,0 @@
-[](http://projects.spring.io/spring-data-mongodb#quick-start)
-[](http://projects.spring.io/spring-data-mongodb#quick-start)
-
-# Spring Data MongoDB
-
-The primary goal of the [Spring Data](http://projects.spring.io/spring-data) project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
-
-The Spring Data MongoDB project aims to provide a familiar and consistent Spring-based programming model for new datastores while retaining store-specific features and capabilities. The Spring Data MongoDB project provides integration with the MongoDB document database. Key functional areas of Spring Data MongoDB are a POJO centric model for interacting with a MongoDB DBCollection and easily writing a repository style data access layer.
-
-## Getting Help
-
-For a comprehensive treatment of all the Spring Data MongoDB features, please refer to:
-
-* the [User Guide](http://docs.spring.io/spring-data/mongodb/docs/current/reference/html/)
-* the [JavaDocs](http://docs.spring.io/spring-data/mongodb/docs/current/api/) have extensive comments in them as well.
-* the home page of [Spring Data MongoDB](http://projects.spring.io/spring-data-mongodb) contains links to articles and other resources.
-* for more detailed questions, use [Spring Data Mongodb on Stackoverflow](http://stackoverflow.com/questions/tagged/spring-data-mongodb).
-
-If you are new to Spring as well as to Spring Data, look for information about [Spring projects](http://projects.spring.io/).
-
-
-## Quick Start
-
-### Maven configuration
-
-Add the Maven dependency:
-
-```xml
-
- org.springframework.data
- spring-data-mongodb
- ${version}.RELEASE
-
-```
-
-If you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version.
-
-```xml
-
- org.springframework.data
- spring-data-mongodb
- ${version}.BUILD-SNAPSHOT
-
-
-
- spring-libs-snapshot
- Spring Snapshot Repository
- http://repo.spring.io/libs-snapshot
-
-```
-
-### MongoTemplate
-
-MongoTemplate is the central support class for Mongo database operations. It provides:
-
-* Basic POJO mapping support to and from BSON
-* Convenience methods to interact with the store (insert object, update objects) and MongoDB specific ones (geo-spatial operations, upserts, map-reduce etc.)
-* Connection affinity callback
-* Exception translation into Spring's [technology agnostic DAO exception hierarchy](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html#dao-exceptions).
-
-### Spring Data repositories
-
-To simplify the creation of data repositories Spring Data MongoDB provides a generic repository programming model. It will automatically create a repository proxy for you that adds implementations of finder methods you specify on an interface.
-
-For example, given a `Person` class with first and last name properties, a `PersonRepository` interface that can query for `Person` by last name and when the first name matches a like expression is shown below:
-
-```java
-public interface PersonRepository extends CrudRepository {
-
- List findByLastname(String lastname);
-
- List findByFirstnameLike(String firstname);
-}
-```
-
-The queries issued on execution will be derived from the method name. Extending `CrudRepository` causes CRUD methods being pulled into the interface so that you can easily save and find single entities and collections of them.
-
-You can have Spring automatically create a proxy for the interface by using the following JavaConfig:
-
-```java
-@Configuration
-@EnableMongoRepositories
-class ApplicationConfig extends AbstractMongoConfiguration {
-
- @Override
- public MongoClient mongoClient() throws Exception {
- return new MongoClient();
- }
-
- @Override
- protected String getDatabaseName() {
- return "springdata";
- }
-}
-```
-
-This sets up a connection to a local MongoDB instance and enables the detection of Spring Data repositories (through `@EnableMongoRepositories`). The same configuration would look like this in XML:
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-```
-
-This will find the repository interface and register a proxy object in the container. You can use it as shown below:
-
-```java
-@Service
-public class MyService {
-
- private final PersonRepository repository;
-
- @Autowired
- public MyService(PersonRepository repository) {
- this.repository = repository;
- }
-
- public void doWork() {
-
- repository.deleteAll();
-
- Person person = new Person();
- person.setFirstname("Oliver");
- person.setLastname("Gierke");
- person = repository.save(person);
-
- List lastNameResults = repository.findByLastname("Gierke");
- List firstNameResults = repository.findByFirstnameLike("Oli*");
- }
-}
-```
-
-## Contributing to Spring Data
-
-Here are some ways for you to get involved in the community:
-
-* Get involved with the Spring community on Stackoverflow and help out on the [spring-data-mongodb](http://stackoverflow.com/questions/tagged/spring-data-mongodb) tag by responding to questions and joining the debate.
-* Create [JIRA](https://jira.spring.io/browse/DATAMONGO) tickets for bugs and new features and comment and vote on the ones that you are interested in.
-* Github is for social coding: if you want to write code, we encourage contributions through pull requests from [forks of this repository](http://help.github.com/forking/). If you want to contribute code this way, please reference a JIRA ticket as well covering the specific issue you are addressing.
-* Watch for upcoming articles on Spring by [subscribing](http://spring.io/blog) to spring.io.
-
-Before we accept a non-trivial patch or pull request we will need you to [sign the Contributor License Agreement](https://cla.pivotal.io/sign/spring). Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. If you forget to do so, you'll be reminded when you submit a pull request. Active contributors might be asked to join the core team, and given the ability to merge pull requests.
diff --git a/SECURITY.adoc b/SECURITY.adoc
new file mode 100644
index 0000000000..9c518d999a
--- /dev/null
+++ b/SECURITY.adoc
@@ -0,0 +1,9 @@
+# Security Policy
+
+## Supported Versions
+
+Please see the https://spring.io/projects/spring-data-mongodb[Spring Data MongoDB] project page for supported versions.
+
+## Reporting a Vulnerability
+
+Please don't raise security vulnerabilities here. Head over to https://pivotal.io/security to learn how to disclose them responsibly.
diff --git a/ci/README.adoc b/ci/README.adoc
new file mode 100644
index 0000000000..f1c11d8496
--- /dev/null
+++ b/ci/README.adoc
@@ -0,0 +1,39 @@
+== Running CI tasks locally
+
+Since Concourse is built on top of Docker, it's easy to:
+
+* Debug what went wrong on your local machine.
+* Test out a a tweak to your `test.sh` script before sending it out.
+* Experiment against a new image before submitting your pull request.
+
+All of these use cases are great reasons to essentially run what Concourse does on your local machine.
+
+IMPORTANT: To do this you must have Docker installed on your machine.
+
+1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-mongodb-github springci/spring-data-openjdk17-with-mongodb-5.0.3 /bin/bash`
++
+This will launch the Docker image and mount your source code at `spring-data-mongodb-github`.
++
+Next, run the `test.sh` script from inside the container:
++
+2. `PROFILE=none spring-data-mongodb-github/ci/test.sh`
+
+Since the container is binding to your source, you can make edits from your IDE and continue to run build jobs.
+
+If you need to test the `build.sh` script, do this:
+
+1. `mkdir /tmp/spring-data-mongodb-artifactory`
+2. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-mongodb-github --mount type=bind,source="/tmp/spring-data-mongodb-artifactory",target=/spring-data-mongodb-artifactory springci/spring-data-openjdk17-with-mongodb-5.0.3 /bin/bash`
++
+This will launch the Docker image and mount your source code at `spring-data-mongodb-github` and the temporary
+artifactory output directory at `spring-data-mongodb-artifactory`.
++
+Next, run the `build.sh` script from inside the container:
++
+3. `spring-data-mongodb-github/ci/build.sh`
+
+IMPORTANT: `build.sh` doesn't actually push to Artifactory so don't worry about accidentally deploying anything.
+It just deploys to a local folder. That way, the `artifactory-resource` later in the pipeline can pick up these artifacts
+and deliver them to artifactory.
+
+NOTE: Docker containers can eat up disk space fast! From time to time, run `docker system prune` to clean out old images.
diff --git a/ci/openjdk17-mongodb-6.0/Dockerfile b/ci/openjdk17-mongodb-6.0/Dockerfile
new file mode 100644
index 0000000000..fd2580e23a
--- /dev/null
+++ b/ci/openjdk17-mongodb-6.0/Dockerfile
@@ -0,0 +1,25 @@
+ARG BASE
+FROM ${BASE}
+# Any ARG statements before FROM are cleared.
+ARG MONGODB
+
+ENV TZ=Etc/UTC
+ENV DEBIAN_FRONTEND=noninteractive
+ENV MONGO_VERSION=${MONGODB}
+
+RUN set -eux; \
+ sed -i -e 's/archive.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
+ sed -i -e 's/security.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
+ sed -i -e 's/ports.ubuntu.com/mirrors.ocf.berkeley.edu/g' /etc/apt/sources.list && \
+ sed -i -e 's/http/https/g' /etc/apt/sources.list && \
+ apt-get update && apt-get install -y apt-transport-https apt-utils gnupg2 wget && \
+ # MongoDB 6.0 release signing key
+ wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add - && \
+ # Needed when MongoDB creates a 6.0 folder.
+ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \
+ echo ${TZ} > /etc/timezone
+
+RUN apt-get update && \
+ apt-get install -y mongodb-org=${MONGODB} mongodb-org-server=${MONGODB} mongodb-org-shell=${MONGODB} mongodb-org-mongos=${MONGODB} mongodb-org-tools=${MONGODB} && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/ci/openjdk17-mongodb-7.0/Dockerfile b/ci/openjdk17-mongodb-7.0/Dockerfile
new file mode 100644
index 0000000000..5701ab9fbc
--- /dev/null
+++ b/ci/openjdk17-mongodb-7.0/Dockerfile
@@ -0,0 +1,25 @@
+ARG BASE
+FROM ${BASE}
+# Any ARG statements before FROM are cleared.
+ARG MONGODB
+
+ENV TZ=Etc/UTC
+ENV DEBIAN_FRONTEND=noninteractive
+ENV MONGO_VERSION=${MONGODB}
+
+RUN set -eux; \
+ sed -i -e 's/archive.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
+ sed -i -e 's/security.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
+ sed -i -e 's/ports.ubuntu.com/mirrors.ocf.berkeley.edu/g' /etc/apt/sources.list && \
+ sed -i -e 's/http/https/g' /etc/apt/sources.list && \
+ apt-get update && apt-get install -y apt-transport-https apt-utils gnupg2 wget && \
+ # MongoDB 6.0 release signing key
+ wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | apt-key add - && \
+ # Needed when MongoDB creates a 7.0 folder.
+ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list && \
+ echo ${TZ} > /etc/timezone
+
+RUN apt-get update && \
+ apt-get install -y mongodb-org=${MONGODB} mongodb-org-server=${MONGODB} mongodb-org-shell=${MONGODB} mongodb-org-mongos=${MONGODB} mongodb-org-tools=${MONGODB} && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/ci/openjdk23-mongodb-8.0/Dockerfile b/ci/openjdk23-mongodb-8.0/Dockerfile
new file mode 100644
index 0000000000..0cb80001bf
--- /dev/null
+++ b/ci/openjdk23-mongodb-8.0/Dockerfile
@@ -0,0 +1,25 @@
+ARG BASE
+FROM ${BASE}
+# Any ARG statements before FROM are cleared.
+ARG MONGODB
+
+ENV TZ=Etc/UTC
+ENV DEBIAN_FRONTEND=noninteractive
+ENV MONGO_VERSION=${MONGODB}
+
+RUN set -eux; \
+ sed -i -e 's/archive.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
+ sed -i -e 's/security.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
+ sed -i -e 's/ports.ubuntu.com/mirrors.ocf.berkeley.edu/g' /etc/apt/sources.list && \
+ sed -i -e 's/http/https/g' /etc/apt/sources.list && \
+ apt-get update && apt-get install -y apt-transport-https apt-utils gnupg2 wget && \
+ # MongoDB 8.0 release signing key
+ wget -qO - https://www.mongodb.org/static/pgp/server-8.0.asc | apt-key add - && \
+ # Needed when MongoDB creates a 8.0 folder.
+ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-8.0.list && \
+ echo ${TZ} > /etc/timezone
+
+RUN apt-get update && \
+ apt-get install -y mongodb-org=${MONGODB} mongodb-org-server=${MONGODB} mongodb-org-shell=${MONGODB} mongodb-org-mongos=${MONGODB} mongodb-org-tools=${MONGODB} && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/ci/pipeline.properties b/ci/pipeline.properties
new file mode 100644
index 0000000000..8dd2295acc
--- /dev/null
+++ b/ci/pipeline.properties
@@ -0,0 +1,32 @@
+# Java versions
+java.main.tag=17.0.15_6-jdk-focal
+java.next.tag=24.0.1_9-jdk-noble
+
+# Docker container images - standard
+docker.java.main.image=library/eclipse-temurin:${java.main.tag}
+docker.java.next.image=library/eclipse-temurin:${java.next.tag}
+
+# Supported versions of MongoDB
+docker.mongodb.6.0.version=6.0.23
+docker.mongodb.7.0.version=7.0.20
+docker.mongodb.8.0.version=8.0.9
+
+# Supported versions of Redis
+docker.redis.6.version=6.2.13
+docker.redis.7.version=7.2.4
+docker.valkey.8.version=8.1.1
+
+# Docker environment settings
+docker.java.inside.basic=-v $HOME:/tmp/jenkins-home
+docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home
+
+# Credentials
+docker.registry=
+docker.credentials=hub.docker.com-springbuildmaster
+docker.proxy.registry=https://docker-hub.usw1.packages.broadcom.com
+docker.proxy.credentials=usw1_packages_broadcom_com-jenkins-token
+artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
+artifactory.url=https://repo.spring.io
+artifactory.repository.snapshot=libs-snapshot-local
+develocity.access-key=gradle_enterprise_secret_access_key
+jenkins.user.name=spring-builds+jenkins
diff --git a/ci/start-replica.sh b/ci/start-replica.sh
new file mode 100755
index 0000000000..9124976f39
--- /dev/null
+++ b/ci/start-replica.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+mkdir -p /tmp/mongodb/db /tmp/mongodb/log
+mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &
+sleep 10
+mongosh --eval "rs.initiate({_id: 'rs0', members:[{_id: 0, host: '127.0.0.1:27017'}]});"
+sleep 15
diff --git a/mvnw b/mvnw
new file mode 100755
index 0000000000..8b9da3b8b6
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,286 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ wget "$jarUrl" -O "$wrapperJarPath"
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ curl -o "$wrapperJarPath" "$jarUrl"
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100755
index 0000000000..fef5a8f7f9
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,161 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ echo Found %WRAPPER_JAR%
+) else (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
+ echo Finished downloading %WRAPPER_JAR%
+)
+@REM End of extension
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
index 6ccfbc2f39..962ae73ffe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,35 +1,33 @@
-
+4.0.0org.springframework.dataspring-data-mongodb-parent
- 2.1.0.BUILD-SNAPSHOT
+ 4.5.0-SNAPSHOTpomSpring Data MongoDBMongoDB support for Spring Data
- http://projects.spring.io/spring-data-mongodb
+ https://spring.io/projects/spring-data-mongodborg.springframework.data.buildspring-data-parent
- 2.1.0.BUILD-SNAPSHOT
+ 3.5.0-SNAPSHOTspring-data-mongodb
- spring-data-mongodb-cross-storespring-data-mongodb-distributionmultispring-data-mongodb
- 2.1.0.BUILD-SNAPSHOT
- 3.6.3
- 1.7.1
+ 3.5.0-SNAPSHOT
+ 5.5.01.19
@@ -39,7 +37,7 @@
Oliver Gierkeogierke at gopivotal.comPivotal
- http://www.gopivotal.com
+ https://pivotal.ioProject Lead
@@ -50,7 +48,7 @@
Thomas Risbergtrisberg at vmware.comPivotal
- http://www.gopivotal.com
+ https://pivotal.ioDeveloper
@@ -61,7 +59,7 @@
Mark Pollackmpollack at gopivotal.comPivotal
- http://www.gopivotal.com
+ https://pivotal.ioDeveloper
@@ -72,7 +70,7 @@
Jon Brisbinjbrisbin at gopivotal.comPivotal
- http://www.gopivotal.com
+ https://pivotal.ioDeveloper
@@ -83,7 +81,7 @@
Thomas Darimonttdarimont at gopivotal.comPivotal
- http://www.gopivotal.com
+ https://pivotal.ioDeveloper
@@ -94,7 +92,7 @@
Christoph Stroblcstrobl at gopivotal.comPivotal
- http://www.gopivotal.com
+ https://pivotal.ioDeveloper
@@ -105,7 +103,7 @@
Mark Paluchmpaluch at pivotal.ioPivotal
- http://www.pivotal.io
+ https://www.pivotal.ioDeveloper
@@ -113,91 +111,66 @@
-
-
-
+
+ GitHub
+ https://github.com/spring-projects/spring-data-mongodb/issues
+
+
-
- mongo36-next
-
- 3.6.0-SNAPSHOT
-
-
+ jmh
- mongo-snapshots
- https://oss.sonatype.org/content/repositories/snapshots
+ jitpack.io
+ https://jitpack.io
-
-
- release
-
-
-
- org.jfrog.buildinfo
- artifactory-maven-plugin
- false
-
-
-
-
-
-
- benchmarks
-
- spring-data-mongodb
- spring-data-mongodb-cross-store
- spring-data-mongodb-distribution
- spring-data-mongodb-benchmarks
-
+ mongo-4.x
+
+ 4.11.1
+ 1.8.0
+
-
-
-
- org.mongodb
- mongo-java-driver
- ${mongo}
-
-
+
+
+
+
+ org.mongodb
+ mongodb-driver-bom
+ ${mongo}
+ pom
+ import
+
+
+
+
- spring-libs-snapshot
- https://repo.spring.io/libs-snapshot
+ spring-snapshot
+ https://repo.spring.io/snapshot
+
+ true
+
+
+ false
+
+
+
+ spring-milestone
+ https://repo.spring.io/milestone
-
-
- spring-plugins-release
- https://repo.spring.io/plugins-release
-
-
- spring-libs-milestone
- https://repo.spring.io/libs-milestone
-
-
-
-
diff --git a/settings.xml b/settings.xml
new file mode 100644
index 0000000000..b3227cc110
--- /dev/null
+++ b/settings.xml
@@ -0,0 +1,29 @@
+
+
+
+
+ spring-plugins-release
+ ${env.ARTIFACTORY_USR}
+ ${env.ARTIFACTORY_PSW}
+
+
+ spring-libs-snapshot
+ ${env.ARTIFACTORY_USR}
+ ${env.ARTIFACTORY_PSW}
+
+
+ spring-libs-milestone
+ ${env.ARTIFACTORY_USR}
+ ${env.ARTIFACTORY_PSW}
+
+
+ spring-libs-release
+ ${env.ARTIFACTORY_USR}
+ ${env.ARTIFACTORY_PSW}
+
+
+
+
\ No newline at end of file
diff --git a/spring-data-mongodb-benchmarks/README.md b/spring-data-mongodb-benchmarks/README.md
deleted file mode 100644
index e11925b7fd..0000000000
--- a/spring-data-mongodb-benchmarks/README.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# Benchmarks
-
-Benchmarks are based on [JMH](http://openjdk.java.net/projects/code-tools/jmh/).
-
-# Running Benchmarks
-
-Running benchmarks is disabled by default and can be activated via the `benchmarks` profile.
-To run the benchmarks with default settings use.
-
-```bash
-mvn -P benchmarks clean test
-```
-
-A basic report will be printed to the CLI.
-
-```bash
-# Run complete. Total time: 00:00:15
-
-Benchmark Mode Cnt Score Error Units
-MappingMongoConverterBenchmark.readObject thrpt 10 1920157,631 ± 64310,809 ops/s
-MappingMongoConverterBenchmark.writeObject thrpt 10 782732,857 ± 53804,130 ops/s
-```
-
-## Running all Benchmarks of a specific class
-
-To run all Benchmarks of a specific class, just provide its simple class name via the `benchmark` command line argument.
-
-```bash
-mvn -P benchmarks clean test -D benchmark=MappingMongoConverterBenchmark
-```
-
-## Running a single Benchmark
-
-To run a single Benchmark provide its containing class simple name followed by `#` and the method name via the `benchmark` command line argument.
-
-```bash
-mvn -P benchmarks clean test -D benchmark=MappingMongoConverterBenchmark#readObjectWith2Properties
-```
-
-# Saving Benchmark Results
-
-A detailed benchmark report is stored in JSON format in the `/target/reports/performance` directory.
-To store the report in a different location use the `benchmarkReportDir` command line argument.
-
-## MongoDB
-
-Results can be directly piped to MongoDB by providing a valid [Connection String](https://docs.mongodb.com/manual/reference/connection-string/) via the `publishTo` command line argument.
-
-```bash
-mvn -P benchmarks clean test -D publishTo=mongodb://127.0.0.1:27017
-```
-
-NOTE: If the uri does not explicitly define a database the default `spring-data-mongodb-benchmarks` is used.
-
-## HTTP Endpoint
-
-The benchmark report can also be posted as `application/json` to an HTTP Endpoint by providing a valid URl via the `publishTo` command line argument.
-
-```bash
-mvn -P benchmarks clean test -D publishTo=http://127.0.0.1:8080/capture-benchmarks
-```
-
-# Customizing Benchmarks
-
-Following options can be set via command line.
-
-Option | Default Value
---- | ---
-warmupIterations | 10
-warmupTime | 1 (seconds)
-measurementIterations | 10
-measurementTime | 1 (seconds)
-forks | 1
-benchmarkReportDir | /target/reports/performance (always relative to project root dir)
-benchmark | .* (single benchmark via `classname#benchmark`)
-publishTo | \[not set\] (mongodb-uri or http-endpoint)
\ No newline at end of file
diff --git a/spring-data-mongodb-benchmarks/pom.xml b/spring-data-mongodb-benchmarks/pom.xml
deleted file mode 100644
index 9baccaa905..0000000000
--- a/spring-data-mongodb-benchmarks/pom.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.springframework.data
- spring-data-mongodb-parent
- 2.1.0.BUILD-SNAPSHOT
- ../pom.xml
-
-
- spring-data-mongodb-benchmarks
- jar
-
- Spring Data MongoDB - Microbenchmarks
-
-
-
- true
-
-
-
-
-
- ${project.groupId}
- spring-data-mongodb
- ${project.version}
-
-
-
- junit
- junit
- ${junit}
- compile
-
-
-
- org.openjdk.jmh
- jmh-core
- ${jmh.version}
-
-
-
- org.openjdk.jmh
- jmh-generator-annprocess
- ${jmh.version}
- provided
-
-
-
-
-
-
-
- benchmarks
-
- false
-
-
-
-
-
-
-
- pl.project13.maven
- git-commit-id-plugin
- 2.2.2
-
-
-
- revision
-
-
-
-
-
- maven-jar-plugin
-
-
- default-jar
- never
-
-
-
-
- maven-surefire-plugin
-
- ${project.build.sourceDirectory}
- ${project.build.outputDirectory}
-
- **/AbstractMicrobenchmark.java
- **/*$*.class
- **/generated/*.class
-
-
- **/*Benchmark*
-
-
- ${project.build.directory}/reports/performance
- ${project.version}
- ${git.dirty}
- ${git.commit.id}
- ${git.branch}
-
-
-
-
-
-
diff --git a/spring-data-mongodb-benchmarks/src/main/resources/logback.xml b/spring-data-mongodb-benchmarks/src/main/resources/logback.xml
deleted file mode 100644
index bccb2dc4fa..0000000000
--- a/spring-data-mongodb-benchmarks/src/main/resources/logback.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
- %d %5p %40.40c:%4L - %m%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spring-data-mongodb-cross-store/aop.xml b/spring-data-mongodb-cross-store/aop.xml
deleted file mode 100644
index d11b1549e8..0000000000
--- a/spring-data-mongodb-cross-store/aop.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spring-data-mongodb-cross-store/pom.xml b/spring-data-mongodb-cross-store/pom.xml
deleted file mode 100644
index 8ba393d38b..0000000000
--- a/spring-data-mongodb-cross-store/pom.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.springframework.data
- spring-data-mongodb-parent
- 2.1.0.BUILD-SNAPSHOT
- ../pom.xml
-
-
- spring-data-mongodb-cross-store
- Spring Data MongoDB - Cross-Store Support
-
-
- 2.1.1
- 5.2.1.Final
- spring.data.mongodb.cross.store
-
-
-
-
-
-
- org.springframework
- spring-beans
-
-
- commons-logging
- commons-logging
-
-
-
-
- org.springframework
- spring-tx
-
-
- org.springframework
- spring-aspects
-
-
- org.springframework
- spring-orm
-
-
-
-
- org.springframework.data
- spring-data-mongodb
- 2.1.0.BUILD-SNAPSHOT
-
-
-
-
- io.projectreactor
- reactor-core
- true
-
-
-
- org.aspectj
- aspectjrt
- ${aspectj}
-
-
-
-
- org.eclipse.persistence
- javax.persistence
- ${jpa}
- true
-
-
-
-
- org.hibernate
- hibernate-entitymanager
- ${hibernate}
- test
-
-
- hsqldb
- hsqldb
- 1.8.0.10
- test
-
-
- javax.validation
- validation-api
- ${validation}
- test
-
-
- org.hibernate
- hibernate-validator
- 5.2.4.Final
- test
-
-
-
-
-
-
-
- org.codehaus.mojo
- aspectj-maven-plugin
- 1.6
-
-
- org.aspectj
- aspectjrt
- ${aspectj}
-
-
- org.aspectj
- aspectjtools
- ${aspectj}
-
-
-
-
-
- compile
- test-compile
-
-
-
-
- true
-
-
- org.springframework
- spring-aspects
-
-
- ${source.level}
- ${source.level}
- ${source.level}
- aop.xml
-
-
-
-
-
-
diff --git a/spring-data-mongodb-cross-store/src/main/java/org/springframework/data/mongodb/crossstore/MongoChangeSetPersister.java b/spring-data-mongodb-cross-store/src/main/java/org/springframework/data/mongodb/crossstore/MongoChangeSetPersister.java
deleted file mode 100644
index 2b9e07a9fe..0000000000
--- a/spring-data-mongodb-cross-store/src/main/java/org/springframework/data/mongodb/crossstore/MongoChangeSetPersister.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright 2011-2018 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.
- */
-package org.springframework.data.mongodb.crossstore;
-
-import javax.persistence.EntityManagerFactory;
-
-import org.bson.Document;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.dao.DataAccessException;
-import org.springframework.dao.DataAccessResourceFailureException;
-import org.springframework.dao.DataIntegrityViolationException;
-import org.springframework.data.crossstore.ChangeSet;
-import org.springframework.data.crossstore.ChangeSetBacked;
-import org.springframework.data.crossstore.ChangeSetPersister;
-import org.springframework.data.mongodb.core.CollectionCallback;
-import org.springframework.data.mongodb.core.MongoTemplate;
-import org.springframework.util.ClassUtils;
-
-import com.mongodb.MongoException;
-import com.mongodb.client.MongoCollection;
-import com.mongodb.client.model.Filters;
-import com.mongodb.client.result.DeleteResult;
-
-/**
- * @author Thomas Risberg
- * @author Oliver Gierke
- * @author Alex Vengrovsk
- * @author Mark Paluch
- * @deprecated will be removed without replacement.
- */
-@Deprecated
-public class MongoChangeSetPersister implements ChangeSetPersister