diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
deleted file mode 100755
index 01e6799..0000000
Binary files a/.mvn/wrapper/maven-wrapper.jar and /dev/null differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
deleted file mode 100755
index 4cd6cde..0000000
--- a/.mvn/wrapper/maven-wrapper.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-#Fri Sep 10 15:38:03 CEST 2021
-distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-bin.zip
diff --git a/CI.adoc b/CI.adoc
deleted file mode 100644
index 87259b6..0000000
--- a/CI.adoc
+++ /dev/null
@@ -1,43 +0,0 @@
-= Continuous Integration
-
-image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-envers%2Fmain&subject=Moore%20(main)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-envers/]
-image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-envers%2F2.1.x&subject=Lovelace%20(2.1.x)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-envers/]
-image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-envers%2F1.1.x&subject=Ingalls%20(1.1.x)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-envers/]
-
-== 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.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 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-envers-github adoptopenjdk/openjdk8:latest /bin/bash`
-+
-This will launch the Docker image and mount your source code at `spring-data-envers-github`.
-+
-2. `cd spring-data-envers-github`
-+
-Next, run your tests from inside the container:
-+
-3. `./mvnw clean dependency:list test -Dsort` (or 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 test building the artifact, do this:
-
-1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-envers-github adoptopenjdk/openjdk8:latest /bin/bash`
-+
-This will launch the Docker image and mount your source code at `spring-data-envers-github`.
-+
-2. `cd spring-data-envers-github`
-+
-Next, try to package everything up from inside the container:
-+
-3. `./mvnw -Pci,snapshot -Dmaven.test.skip=true clean package`
-
-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/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
deleted file mode 100644
index 740e8bd..0000000
--- a/CONTRIBUTING.adoc
+++ /dev/null
@@ -1,3 +0,0 @@
-= Spring Data contribution guidelines
-
-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
deleted file mode 100644
index df1c19f..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,118 +0,0 @@
-pipeline {
- agent none
-
- triggers {
- pollSCM 'H/10 * * * *'
- upstream(upstreamProjects: "spring-data-jpa/3.0.x", threshold: hudson.model.Result.SUCCESS)
- }
-
- options {
- disableConcurrentBuilds()
- buildDiscarder(logRotator(numToKeepStr: '14'))
- }
-
- stages {
- stage("test: baseline (jdk17)") {
- when {
- anyOf {
- branch 'main'
- not { triggeredBy 'UpstreamCause' }
- }
- }
- agent {
- label 'data'
- }
- options { timeout(time: 30, unit: 'MINUTES') }
- environment {
- ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
- }
- steps {
- script {
- docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
- docker.image('openjdk:17-bullseye').inside('-v $HOME:/tmp/jenkins-home') {
- sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list test -Dsort -U -B'
- }
- }
- }
- }
- }
-
- stage('Release to artifactory') {
- when {
- anyOf {
- branch 'main'
- not { triggeredBy 'UpstreamCause' }
- }
- }
- agent {
- label 'data'
- }
- options { timeout(time: 20, unit: 'MINUTES') }
-
- environment {
- ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
- }
-
- steps {
- script {
- docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
- docker.image('openjdk:17-bullseye').inside('-v $HOME:/tmp/jenkins-home') {
- sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory ' +
- '-Dartifactory.server=https://repo.spring.io ' +
- "-Dartifactory.username=${ARTIFACTORY_USR} " +
- "-Dartifactory.password=${ARTIFACTORY_PSW} " +
- "-Dartifactory.staging-repository=libs-snapshot-local " +
- "-Dartifactory.build-name=spring-data-envers " +
- "-Dartifactory.build-number=${BUILD_NUMBER} " +
- '-Dmaven.test.skip=true clean deploy -U -B'
- }
- }
- }
- }
- }
- stage('Publish documentation') {
- when {
- branch 'main'
- }
- agent {
- label 'data'
- }
- options { timeout(time: 20, unit: 'MINUTES') }
-
- environment {
- ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
- }
-
- steps {
- script {
- docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
- docker.image('openjdk:17-bullseye').inside('-v $HOME:/tmp/jenkins-home') {
- sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
- '-Dartifactory.server=https://repo.spring.io ' +
- "-Dartifactory.username=${ARTIFACTORY_USR} " +
- "-Dartifactory.password=${ARTIFACTORY_PSW} " +
- "-Dartifactory.distribution-repository=temp-private-local " +
- '-Dmaven.test.skip=true clean deploy -U -B'
- }
- }
- }
- }
- }
- }
-
- post {
- changed {
- script {
- slackSend(
- color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger',
- channel: '#spring-data-dev',
- message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}")
- 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/README.adoc b/README.adoc
index 918c85f..7e63355 100644
--- a/README.adoc
+++ b/README.adoc
@@ -1,138 +1,6 @@
-image:https://spring.io/badges/spring-data-envers/ga.svg[title=Spring Data Envers,link=https://projects.spring.io/spring-data-envers#quick-start]
-image:https://spring.io/badges/spring-data-envers/snapshot.svg[title=Spring Data Envers,link=https://projects.spring.io/spring-data-envers#quick-start]
+= Spring Data Envers
-= Spring Data Envers image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-envers%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-envers/] https://gitter.im/spring-projects/spring-data[image:https://badges.gitter.im/spring-projects/spring-data.svg[Gitter]]
-
-This project is an extension of the https://github.com/SpringSource/spring-data-jpa[Spring Data JPA] project to allow access to entity revisions managed by Hibernate Envers.The sources mostly originate from a contribution of Philipp Hügelmeyer https://github.com/hygl[@hygl].
-
-The core feature of the module consists of an implementation of the `RevisionRepository` of Spring Data Commons.
-
-== 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
-
-[source,java]
-----
-public interface RevisionRepository> {
-
- Revision findLastChangeRevision(ID id);
-
- Revisions findRevisions(ID id);
-
- Page> findRevisions(ID id, Pageable pageable);
-}
-----
-
-You can pull in this functionality to your repositories by simply additionally extending the interface just mentioned:
-
-[source,java]
-----
-interface PersonRepository extends RevisionRepository, CrudRepository {
-
- // Your query methods go here
-}
-----
-
-To activate the Spring Data Envers repositories, use the Spring Data Envers' `EnableEnversRepositories` annotation:
-
-[source,java]
-----
-@Configuration
-@EnableEnversRepositories
-public class ApplicationConfiguration {
-
- // Your configuration beans
-
-}
-----
-
-or use the Spring Data JPA repositories namespace element's `factory-class` attribute, in case of XML configuration:
-
-[source,xml]
-----
-
-----
-
-=== Maven configuration
-
-Add the Maven dependency:
-
-[source,xml]
-----
-
- org.springframework.data
- spring-data-envers
- ${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.
-
-[source,xml]
-----
-
- org.springframework.data
- spring-data-envers
- ${version}.BUILD-SNAPSHOT
-
-
-
- spring-libs-snapshot
- Spring Snapshot Repository
- https://repo.spring.io/libs-snapshot
-
-----
-
-== Getting Help
-
-Having trouble with Spring Data? We’d love to help!
-
-* Check the
-https://docs.spring.io/spring-data/envers/docs/current/reference/html/[reference documentation], and https://docs.spring.io/spring-data/envers/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].
-* Ask a question - we monitor https://stackoverflow.com[stackoverflow.com] for questions tagged with https://stackoverflow.com/tags/spring-data-envers[`spring-data-envers`].
-You can also chat with the community on https://gitter.im/spring-projects/spring-data[Gitter].
-* Report bugs with Spring Data envers at https://github.com/spring-projects/spring-data-envers/issues[github.com/spring-projects/spring-data-envers/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-envers/issues[issue tracker] to see if someone has already reported the problem.
-* If the issue doesn’t already exist, https://github.com/spring-projects/spring-data-envers/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 and JVM version.
-* If you need to paste code, or include a stack trace use Markdown +++```+++ escapes before and after your text.
-* If possible try to create a test-case or project that replicates the issue. Attach a link to your code or a compressed file containing your code.
-
-== Building from Source
-
-You don’t need to build from source to use Spring Data (binaries in https://repo.spring.io[repo.spring.io]), but if you want to try out the latest and greatest, Spring Data can be easily built with the https://github.com/takari/maven-wrapper[maven wrapper].
-You also need JDK 1.8.
-
-[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.5.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 -Pdistribute
-----
-
-The generated documentation is available from `target/site/reference/html/index.html`.
+This project is now part of https://github.com/spring-projects/spring-data-jpa[Spring Data JPA 3.0].
== License
diff --git a/SECURITY.adoc b/SECURITY.adoc
index f8864a7..132faa9 100644
--- a/SECURITY.adoc
+++ b/SECURITY.adoc
@@ -2,7 +2,7 @@
## Supported Versions
-Please see the https://spring.io/projects/spring-data-envers[Spring Data Envers] project page for supported versions.
+Please see the https://spring.io/projects/spring-data-jpa[Spring Data JPA] project page for supported versions.
## Reporting a Vulnerability
diff --git a/etc/eclipse-formatter.xml b/etc/eclipse-formatter.xml
deleted file mode 100644
index c744687..0000000
--- a/etc/eclipse-formatter.xml
+++ /dev/null
@@ -1,291 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mvnw b/mvnw
deleted file mode 100755
index 8b9da3b..0000000
--- a/mvnw
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/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
deleted file mode 100755
index fef5a8f..0000000
--- a/mvnw.cmd
+++ /dev/null
@@ -1,161 +0,0 @@
-@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
deleted file mode 100755
index e6da4b5..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
- 4.0.0
-
- org.springframework.data
- spring-data-envers
- 3.0.0-SNAPSHOT
-
-
- org.springframework.data.build
- spring-data-parent
- 3.0.0-SNAPSHOT
-
-
-
- Spring Data Envers
- Spring Data extension to work with Hibernate Envers
- https://github.com/SpringSource/spring-data-envers
-
-
-
- Oliver Gierke
- ogierke@pivotal.io
- Pivotal Software, Inc.
- www.spring.io
-
-
- Philip Huegelmeyer
- philip.huegelmeyer@ble.de
- BLE
- www.ble.de
-
-
- Michael Igler
- michael.igler@forward-tech.de
- Freelancer
-
-
- Jens Schauder
- jschauder@vmware.com
- VMware, Inc.
- www.spring.io
-
-
-
-
- https://github.com/SpringSource/spring-data-envers
-
-
-
- 2.6.0-SNAPSHOT
- 5.5.3.Final
- spring.data.envers
-
-
-
-
-
- org.springframework.data
- spring-data-jpa
- ${springdata.jpa}
-
-
-
-
- org.hibernate
- hibernate-envers
- ${hibernate.envers}
-
-
-
-
- com.querydsl
- querydsl-apt
- ${querydsl}
- provided
-
-
-
- com.querydsl
- querydsl-jpa
- ${querydsl}
- true
-
-
-
-
- com.h2database
- h2
- 1.4.200
- test
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
-
-
- org.asciidoctor
- asciidoctor-maven-plugin
-
-
-
-
-
-
-
- spring-libs-snapshot
- https://repo.spring.io/libs-snapshot
-
-
-
-
-
- spring-plugins-release
- https://repo.spring.io/plugins-release
-
-
-
-
diff --git a/settings.xml b/settings.xml
deleted file mode 100644
index b3227cc..0000000
--- a/settings.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- 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/src/main/asciidoc/envers.adoc b/src/main/asciidoc/envers.adoc
deleted file mode 100644
index 534ae9c..0000000
--- a/src/main/asciidoc/envers.adoc
+++ /dev/null
@@ -1,201 +0,0 @@
-[[envers.what.is.spring.data]]
-== What is Spring Data Envers?
-
-Spring Data Envers makes typical Envers queries available in repositories for Spring Data JPA.
-It differs from other Spring Data modules in that it is always used in combination with another Spring Data Module: Spring Data JPA.
-
-[[envers.what]]
-== What is Envers?
-
-Envers is a https://hibernate.org/orm/envers/[Hibernate module] that adds auditing capabilities to JPA entities.
-This documentation assumes you are familiar with Envers, just as Spring Data Envers relies on Envers being properly configured.
-
-[[envers.configuration]]
-== Configuration
-
-As a starting point for using Spring Data Envers, you need a project with Spring Data JPA on the classpath and an additional `spring-data-envers` dependency:
-
-====
-[source,xml,subs="+attributes"]
-----
-
-
-
-
-
- org.springframework.data
- spring-data-envers
- {version}
-
-
-
-----
-====
-
-This also brings `hibernate-envers` into the project as a transient dependency.
-
-To enable Spring Data Envers and Spring Data JPA, we need to configure two beans and a special `repositoryFactoryBeanClass`:
-
-====
-[source,java]
-----
-@Configuration
-@EnableEnversRepositories
-@EnableTransactionManagement
-public class EnversDemoConfiguration {
-
- @Bean
- public DataSource dataSource() {
-
- EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
- return builder.setType(EmbeddedDatabaseType.HSQL).build();
- }
-
- @Bean
- public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
-
- HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
- vendorAdapter.setGenerateDdl(true);
-
- LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
- factory.setJpaVendorAdapter(vendorAdapter);
- factory.setPackagesToScan("example.springdata.jpa.envers");
- factory.setDataSource(dataSource());
- return factory;
- }
-
- @Bean
- public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
-
- JpaTransactionManager txManager = new JpaTransactionManager();
- txManager.setEntityManagerFactory(entityManagerFactory);
- return txManager;
- }
-}
-----
-====
-
-To actually use Spring Data Envers, make one or more repositories into a {spring-data-commons-javadoc-base}/org/springframework/data/repository/history/RevisionRepository.html[`RevisionRepository`] by adding it as an extended interface:
-
-====
-[source,java]
-----
-interface PersonRepository
- extends CrudRepository,
- RevisionRepository // <1>
-{}
-----
-<1> The first type parameter (`Person`) denotes the entity type, the second (`Long`) denotes the type of the id property, and the last one (`Long`) is the type of the revision number.
-For Envers in default configuration, the revision number parameter should be `Integer` or `Long`.
-====
-
-The entity for that repository must be an entity with Envers auditing enabled (that is, it must have an `@Audited` annotation):
-
-====
-[source,java]
-----
-@Entity
-@Audited
-class Person {
-
- @Id @GeneratedValue
- Long id;
- String name;
- @Version Long version;
-}
-----
-====
-
-[[envers.usage]]
-== Usage
-
-You can now use the methods from `RevisionRepository` to query the revisions of the entity, as the following test case shows:
-
-====
-[source,java]
-----
-@ExtendWith(SpringExtension.class)
-@Import(EnversDemoConfiguration.class) // <1>
-class EnversIntegrationTests {
-
- final PersonRepository repository;
- final TransactionTemplate tx;
-
- EnversIntegrationTests(@Autowired PersonRepository repository, @Autowired PlatformTransactionManager tm) {
- this.repository = repository;
- this.tx = new TransactionTemplate(tm);
- }
-
- @Test
- void testRepository() {
-
- Person updated = preparePersonHistory();
-
- Revisions revisions = repository.findRevisions(updated.id);
-
- Iterator> revisionIterator = revisions.iterator();
-
- checkNextRevision(revisionIterator, "John", RevisionType.INSERT);
- checkNextRevision(revisionIterator, "Jonny", RevisionType.UPDATE);
- checkNextRevision(revisionIterator, null, RevisionType.DELETE);
- assertThat(revisionIterator.hasNext()).isFalse();
-
- }
-
- /**
- * Checks that the next element in the iterator is a Revision entry referencing a Person
- * with the given name after whatever change brought that Revision into existence.
- *
- * As a side effect the Iterator gets advanced by one element.
- *
- * @param revisionIterator the iterator to be tested.
- * @param name the expected name of the Person referenced by the Revision.
- * @param revisionType the type of the revision denoting if it represents an insert, update or delete.
- */
- private void checkNextRevision(Iterator> revisionIterator, String name,
- RevisionType revisionType) {
-
- assertThat(revisionIterator.hasNext()).isTrue();
- Revision revision = revisionIterator.next();
- assertThat(revision.getEntity().name).isEqualTo(name);
- assertThat(revision.getMetadata().getRevisionType()).isEqualTo(revisionType);
- }
-
- /**
- * Creates a Person with a couple of changes so it has a non-trivial revision history.
- * @return the created Person.
- */
- private Person preparePersonHistory() {
-
- Person john = new Person();
- john.setName("John");
-
- // create
- Person saved = tx.execute(__ -> repository.save(john));
- assertThat(saved).isNotNull();
-
- saved.setName("Jonny");
-
- // update
- Person updated = tx.execute(__ -> repository.save(saved));
- assertThat(updated).isNotNull();
-
- // delete
- tx.executeWithoutResult(__ -> repository.delete(updated));
- return updated;
- }
-}
-----
-<1> This references the application context configuration presented earlier (in the <> section).
-====
-
-[[envers.resources]]
-== Further Resources
-
-You can download the https://github.com/spring-projects/spring-data-examples[Spring Data Envers example in the Spring Data Examples repository] and play around with to get a feel for how the library works.
-
-You should also check out the {spring-data-commons-javadoc-base}/org/springframework/data/repository/history/RevisionRepository.html[Javadoc for `RevisionRepository`] and related classes.
-
-You can ask questions at https://stackoverflow.com/questions/tagged/spring-data-envers[Stackoverflow by using the `spring-data-envers` tag].
-
-The https://github.com/spring-projects/spring-data-envers[source code and issue tracker for Spring Data Envers is hosted at GitHub].
diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc
deleted file mode 100644
index f51aeef..0000000
--- a/src/main/asciidoc/index.adoc
+++ /dev/null
@@ -1,29 +0,0 @@
-= Spring Data Envers - Reference Documentation
-Oliver Gierke; Jens Schauder; Mark Paluch
-:revnumber: {version}
-:revdate: {localdate}
-:javadoc-base: https://docs.spring.io/spring-data/envers/docs/{revnumber}/api/
-:spring-data-commons-docs: ../../../../spring-data-commons/src/main/asciidoc
-:spring-data-commons-javadoc-base: https://docs.spring.io/spring-data/commons/docs/current/api/
-(C) 2008-2022 The original authors.
-
-NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
-
-toc::[]
-
-include::{spring-data-commons-docs}/dependencies.adoc[leveloffset=+1]
-include::{spring-data-commons-docs}/repositories.adoc[leveloffset=+1]
-
-[[reference]]
-== Reference Documentation
-
-include::envers.adoc[leveloffset=+1]
-
-
-[[appendix]]
-== Appendix
-
-:numbered!:
-include::{spring-data-commons-docs}/repository-namespace-reference.adoc[leveloffset=+1]
-include::{spring-data-commons-docs}/repository-populator-namespace-reference.adoc[leveloffset=+1]
-include::{spring-data-commons-docs}/repository-query-keywords-reference.adoc[leveloffset=+1]
diff --git a/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java b/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java
deleted file mode 100644
index effc3f5..0000000
--- a/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright 2021-2022 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
- *
- * 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.
- */
-package org.springframework.data.envers.repository.config;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.persistence.EntityManagerFactory;
-
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.context.annotation.ComponentScan.Filter;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.core.annotation.AliasFor;
-import org.springframework.data.envers.repository.support.EnversRevisionRepositoryFactoryBean;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean;
-import org.springframework.data.repository.config.BootstrapMode;
-import org.springframework.data.repository.config.DefaultRepositoryBaseClass;
-import org.springframework.data.repository.query.QueryLookupStrategy;
-import org.springframework.data.repository.query.QueryLookupStrategy.Key;
-import org.springframework.transaction.PlatformTransactionManager;
-
-/**
- * Annotation to enable Envers repositories. Will scan the package of the annotated configuration class for Spring Data
- * repositories by default.
- *
- * This annotation is a meta-annotation for {@link EnableJpaRepositories @EnableJpaRepositories} overriding the default
- * {@link #repositoryFactoryBeanClass} to {@link EnversRevisionRepositoryFactoryBean}.
- *
- * @author Mark Paluch
- * @since 2.5
- * @see EnableJpaRepositories
- * @see AliasFor
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-@Inherited
-@EnableJpaRepositories
-public @interface EnableEnversRepositories {
-
- /**
- * Alias for the {@link #basePackages()} attribute. Allows for more concise annotation declarations e.g.:
- * {@code @EnableJpaRepositories("org.my.pkg")} instead of
- * {@code @EnableEnversRepositories(basePackages="org.my.pkg")}.
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- String[] value() default {};
-
- /**
- * Base packages to scan for annotated components. {@link #value()} is an alias for (and mutually exclusive with) this
- * attribute. Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names.
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- String[] basePackages() default {};
-
- /**
- * Type-safe alternative to {@link #basePackages()} for specifying the packages to scan for annotated components. The
- * package of each class specified will be scanned. Consider creating a special no-op marker class or interface in
- * each package that serves no purpose other than being referenced by this attribute.
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- Class>[] basePackageClasses() default {};
-
- /**
- * Specifies which types are eligible for component scanning. Further narrows the set of candidate components from
- * everything in {@link #basePackages()} to everything in the base packages that matches the given filter or filters.
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- Filter[] includeFilters() default {};
-
- /**
- * Specifies which types are not eligible for component scanning.
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- Filter[] excludeFilters() default {};
-
- /**
- * Returns the postfix to be used when looking up custom repository implementations. Defaults to {@literal Impl}. So
- * for a repository named {@code PersonRepository} the corresponding implementation class will be looked up scanning
- * for {@code PersonRepositoryImpl}.
- *
- * @return
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- String repositoryImplementationPostfix() default "Impl";
-
- /**
- * Configures the location of where to find the Spring Data named queries properties file. Will default to
- * {@code META-INF/jpa-named-queries.properties}.
- *
- * @return
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- String namedQueriesLocation() default "";
-
- /**
- * Returns the key of the {@link QueryLookupStrategy} to be used for lookup queries for query methods. Defaults to
- * {@link Key#CREATE_IF_NOT_FOUND}.
- *
- * @return
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- Key queryLookupStrategy() default Key.CREATE_IF_NOT_FOUND;
-
- /**
- * Returns the {@link FactoryBean} class to be used for each repository instance. Defaults to
- * {@link JpaRepositoryFactoryBean}.
- *
- * @return
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- Class> repositoryFactoryBeanClass() default EnversRevisionRepositoryFactoryBean.class;
-
- /**
- * Configure the repository base class to be used to create repository proxies for this particular configuration.
- *
- * @return
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- Class> repositoryBaseClass() default DefaultRepositoryBaseClass.class;
-
- // JPA specific configuration
-
- /**
- * Configures the name of the {@link EntityManagerFactory} bean definition to be used to create repositories
- * discovered through this annotation. Defaults to {@code entityManagerFactory}.
- *
- * @return
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- String entityManagerFactoryRef() default "entityManagerFactory";
-
- /**
- * Configures the name of the {@link PlatformTransactionManager} bean definition to be used to create repositories
- * discovered through this annotation. Defaults to {@code transactionManager}.
- *
- * @return
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- String transactionManagerRef() default "transactionManager";
-
- /**
- * Configures whether nested repository-interfaces (e.g. defined as inner classes) should be discovered by the
- * repositories infrastructure.
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- boolean considerNestedRepositories() default false;
-
- /**
- * Configures whether to enable default transactions for Spring Data JPA repositories. Defaults to {@literal true}. If
- * disabled, repositories must be used behind a facade that's configuring transactions (e.g. using Spring's annotation
- * driven transaction facilities) or repository methods have to be used to demarcate transactions.
- *
- * @return whether to enable default transactions, defaults to {@literal true}.
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- boolean enableDefaultTransactions() default true;
-
- /**
- * Configures when the repositories are initialized in the bootstrap lifecycle. {@link BootstrapMode#DEFAULT}
- * (default) means eager initialization except all repository interfaces annotated with {@link Lazy},
- * {@link BootstrapMode#LAZY} means lazy by default including injection of lazy-initialization proxies into client
- * beans so that those can be instantiated but will only trigger the initialization upon first repository usage (i.e a
- * method invocation on it). This means repositories can still be uninitialized when the application context has
- * completed its bootstrap. {@link BootstrapMode#DEFERRED} is fundamentally the same as {@link BootstrapMode#LAZY},
- * but triggers repository initialization when the application context finishes its bootstrap.
- *
- * @return
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- BootstrapMode bootstrapMode() default BootstrapMode.DEFAULT;
-
- /**
- * Configures what character is used to escape the wildcards {@literal _} and {@literal %} in derived queries with
- * {@literal contains}, {@literal startsWith} or {@literal endsWith} clauses.
- *
- * @return a single character used for escaping.
- */
- @AliasFor(annotation = EnableJpaRepositories.class)
- char escapeCharacter() default '\\';
-}
diff --git a/src/main/java/org/springframework/data/envers/repository/config/package-info.java b/src/main/java/org/springframework/data/envers/repository/config/package-info.java
deleted file mode 100644
index 2e79b25..0000000
--- a/src/main/java/org/springframework/data/envers/repository/config/package-info.java
+++ /dev/null
@@ -1,5 +0,0 @@
-/**
- * Classes for Envers Repositories configuration support.
- */
-@org.springframework.lang.NonNullApi
-package org.springframework.data.envers.repository.config;
diff --git a/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java b/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java
deleted file mode 100644
index b4e8071..0000000
--- a/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2012-2022 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
- *
- * 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.
- */
-package org.springframework.data.envers.repository.support;
-
-import org.hibernate.envers.DefaultRevisionEntity;
-import org.springframework.data.repository.history.support.RevisionEntityInformation;
-
-/**
- * {@link RevisionEntityInformation} for {@link DefaultRevisionEntity}.
- *
- * @author Oliver Gierke
- */
-class DefaultRevisionEntityInformation implements RevisionEntityInformation {
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.repository.history.support.RevisionEntityInformation#getRevisionNumberType()
- */
- public Class> getRevisionNumberType() {
- return Integer.class;
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.repository.history.support.RevisionEntityInformation#isDefaultRevisionEntity()
- */
- public boolean isDefaultRevisionEntity() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.repository.history.support.RevisionEntityInformation#getRevisionEntityClass()
- */
- public Class> getRevisionEntityClass() {
- return DefaultRevisionEntity.class;
- }
-}
diff --git a/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java b/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java
deleted file mode 100755
index 8fab747..0000000
--- a/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2012-2022 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
- *
- * 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.
- */
-package org.springframework.data.envers.repository.support;
-
-import java.time.Instant;
-import java.time.LocalDateTime;
-import java.time.ZoneOffset;
-import java.util.Optional;
-
-import org.hibernate.envers.DefaultRevisionEntity;
-
-import org.springframework.data.history.RevisionMetadata;
-import org.springframework.util.Assert;
-
-/**
- * {@link RevisionMetadata} working with a {@link DefaultRevisionEntity}. The entity/delegate itself gets ignored for
- * {@link #equals(Object)} and {@link #hashCode()} since they depend on the way they were obtained.
- *
- * @author Oliver Gierke
- * @author Philip Huegelmeyer
- * @author Jens Schauder
- */
-public final class DefaultRevisionMetadata implements RevisionMetadata {
-
- private final DefaultRevisionEntity entity;
- private final RevisionType revisionType;
-
- public DefaultRevisionMetadata(DefaultRevisionEntity entity) {
- this(entity, RevisionType.UNKNOWN);
- }
-
- public DefaultRevisionMetadata(DefaultRevisionEntity entity, RevisionType revisionType) {
-
- Assert.notNull(entity, "DefaultRevisionEntity must not be null");
-
- this.entity = entity;
- this.revisionType = revisionType;
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.history.RevisionMetadata#getRevisionNumber()
- */
- public Optional getRevisionNumber() {
- return Optional.of(entity.getId());
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.history.RevisionMetadata#getRevisionDate()
- */
- @Deprecated
- public Optional getRevisionDate() {
- return getRevisionInstant().map(instant -> LocalDateTime.ofInstant(instant, ZoneOffset.systemDefault()));
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.history.RevisionMetadata#getRevisionInstant()
- */
- @Override
- public Optional getRevisionInstant() {
- return Optional.of(Instant.ofEpochMilli(entity.getTimestamp()));
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.history.RevisionMetadata#getDelegate()
- */
- @SuppressWarnings("unchecked")
- public T getDelegate() {
- return (T) entity;
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.history.RevisionMetadata#getRevisionType()
- */
- @Override
- public RevisionType getRevisionType() {
- return revisionType;
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object o) {
-
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- DefaultRevisionMetadata that = (DefaultRevisionMetadata) o;
- return getRevisionNumber().equals(that.getRevisionNumber())
- && getRevisionInstant().equals(that.getRevisionInstant()) && revisionType.equals(that.getRevisionType());
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "DefaultRevisionMetadata{" + "entity=" + entity + ", revisionType=" + revisionType + '}';
- }
-}
diff --git a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java
deleted file mode 100644
index 9d63891..0000000
--- a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2012-2022 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
- *
- * 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.
- */
-package org.springframework.data.envers.repository.support;
-
-import java.io.Serializable;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.repository.NoRepositoryBean;
-import org.springframework.data.repository.history.RevisionRepository;
-
-/**
- * Convenience interface to allow pulling in {@link JpaRepository} and {@link RevisionRepository} functionality in one
- * go.
- *
- * @author Oliver Gierke
- * @author Michael Igler
- * @deprecated since 1.1, in favor of simply extending {@link RevisionRepository}.
- */
-@Deprecated
-@NoRepositoryBean
-public interface EnversRevisionRepository>
- extends RevisionRepository, JpaRepository {
-
-}
diff --git a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java
deleted file mode 100755
index fcd17f9..0000000
--- a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2012-2022 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
- *
- * 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.
- */
-package org.springframework.data.envers.repository.support;
-
-import java.util.Optional;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.DefaultRevisionEntity;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.data.jpa.repository.support.JpaRepositoryFactory;
-import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean;
-import org.springframework.data.repository.core.RepositoryMetadata;
-import org.springframework.data.repository.core.support.RepositoryComposition.RepositoryFragments;
-import org.springframework.data.repository.core.support.RepositoryFactorySupport;
-import org.springframework.data.repository.history.RevisionRepository;
-import org.springframework.data.repository.history.support.RevisionEntityInformation;
-
-/**
- * {@link FactoryBean} creating {@link RevisionRepository} instances.
- *
- * @author Oliver Gierke
- * @author Michael Igler
- */
-public class EnversRevisionRepositoryFactoryBean, S, ID, N extends Number & Comparable>
- extends JpaRepositoryFactoryBean {
-
- private Class> revisionEntityClass;
-
- /**
- * Creates a new {@link EnversRevisionRepositoryFactoryBean} for the given repository interface.
- *
- * @param repositoryInterface must not be {@literal null}.
- */
- public EnversRevisionRepositoryFactoryBean(Class extends T> repositoryInterface) {
- super(repositoryInterface);
- }
-
- /**
- * Configures the revision entity class. Will default to {@link DefaultRevisionEntity}.
- *
- * @param revisionEntityClass
- */
- public void setRevisionEntityClass(Class> revisionEntityClass) {
- this.revisionEntityClass = revisionEntityClass;
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean#createRepositoryFactory(javax.persistence.EntityManager)
- */
- @Override
- protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
- return new RevisionRepositoryFactory(entityManager, revisionEntityClass);
- }
-
- /**
- * Repository factory creating {@link RevisionRepository} instances.
- *
- * @author Oliver Gierke
- * @author Jens Schauder
- */
- private static class RevisionRepositoryFactory> extends JpaRepositoryFactory {
-
- private final RevisionEntityInformation revisionEntityInformation;
- private final EntityManager entityManager;
-
- /**
- * Creates a new {@link RevisionRepositoryFactory} using the given {@link EntityManager} and revision entity class.
- *
- * @param entityManager must not be {@literal null}.
- * @param revisionEntityClass can be {@literal null}, will default to {@link DefaultRevisionEntity}.
- */
- public RevisionRepositoryFactory(EntityManager entityManager, Class> revisionEntityClass) {
-
- super(entityManager);
-
- this.entityManager = entityManager;
- this.revisionEntityInformation = Optional.ofNullable(revisionEntityClass) //
- .filter(it -> !it.equals(DefaultRevisionEntity.class))//
- . map(ReflectionRevisionEntityInformation::new) //
- .orElseGet(DefaultRevisionEntityInformation::new);
- }
-
- @Override
- protected RepositoryFragments getRepositoryFragments(RepositoryMetadata metadata) {
-
- Object fragmentImplementation = getTargetRepositoryViaReflection( //
- EnversRevisionRepositoryImpl.class, //
- getEntityInformation(metadata.getDomainType()), //
- revisionEntityInformation, //
- entityManager //
- );
-
- return RepositoryFragments //
- .just(fragmentImplementation) //
- .append(super.getRepositoryFragments(metadata));
- }
- }
-}
diff --git a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java
deleted file mode 100755
index f705fdd..0000000
--- a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright 2012-2022 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
- *
- * 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.
- */
-package org.springframework.data.envers.repository.support;
-
-import static org.springframework.data.history.RevisionMetadata.RevisionType.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.AuditReader;
-import org.hibernate.envers.AuditReaderFactory;
-import org.hibernate.envers.DefaultRevisionEntity;
-import org.hibernate.envers.RevisionNumber;
-import org.hibernate.envers.RevisionTimestamp;
-import org.hibernate.envers.RevisionType;
-import org.hibernate.envers.query.AuditEntity;
-import org.hibernate.envers.query.AuditQuery;
-import org.hibernate.envers.query.order.AuditOrder;
-
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageImpl;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.history.AnnotationRevisionMetadata;
-import org.springframework.data.history.Revision;
-import org.springframework.data.history.RevisionMetadata;
-import org.springframework.data.history.RevisionSort;
-import org.springframework.data.history.Revisions;
-import org.springframework.data.jpa.repository.support.JpaEntityInformation;
-import org.springframework.data.repository.core.EntityInformation;
-import org.springframework.data.repository.history.RevisionRepository;
-import org.springframework.data.repository.history.support.RevisionEntityInformation;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.Assert;
-
-/**
- * Repository implementation using Hibernate Envers to implement revision specific query methods.
- *
- * @author Oliver Gierke
- * @author Philipp Huegelmeyer
- * @author Michael Igler
- * @author Jens Schauder
- * @author Julien Millau
- * @author Mark Paluch
- * @author Sander Bylemans
- */
-@Transactional(readOnly = true)
-public class EnversRevisionRepositoryImpl>
- implements RevisionRepository {
-
- private final EntityInformation entityInformation;
- private final EntityManager entityManager;
-
- /**
- * Creates a new {@link EnversRevisionRepositoryImpl} using the given {@link JpaEntityInformation},
- * {@link RevisionEntityInformation} and {@link EntityManager}.
- *
- * @param entityInformation must not be {@literal null}.
- * @param revisionEntityInformation must not be {@literal null}.
- * @param entityManager must not be {@literal null}.
- */
- public EnversRevisionRepositoryImpl(JpaEntityInformation entityInformation,
- RevisionEntityInformation revisionEntityInformation, EntityManager entityManager) {
-
- Assert.notNull(revisionEntityInformation, "RevisionEntityInformation must not be null!");
-
- this.entityInformation = entityInformation;
- this.entityManager = entityManager;
- }
-
- /*
- * (non-Javadoc)
- * @see org.springframework.data.repository.history.RevisionRepository#findLastChangeRevision(java.io.Serializable)
- */
- @SuppressWarnings("unchecked")
- public Optional> findLastChangeRevision(ID id) {
-
- List