From 2d4e74ad92c68b7f732ec8374d5df7e61c15cb0e Mon Sep 17 00:00:00 2001 From: Stefan Miklosovic Date: Mon, 9 Sep 2024 10:26:33 +0200 Subject: [PATCH] comment out modules older than 3.x, update circleci config --- .circleci/config.yml | 243 +++++------------------------------------ .gitignore | 1 + README.adoc | 6 + base/pom.xml | 5 + cassandra-2.2/pom.xml | 3 + cassandra-3.0/pom.xml | 3 + cassandra-3.11/pom.xml | 3 + cassandra-4.0/pom.xml | 3 + cassandra-4.1/pom.xml | 3 + cassandra-5.0/pom.xml | 5 +- pom.xml | 9 +- 11 files changed, 59 insertions(+), 225 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 39e8976..84e4f53 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,13 +2,13 @@ version: 2.1 jobs: build: machine: - image: ubuntu-2004:202201-02 + image: ubuntu-2204:2024.05.1 working_directory: ~/cassandra-ldap environment: MAVEN_OPTS: -Xmx3200m - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 steps: @@ -23,91 +23,19 @@ jobs: - ~/.m2 key: m2-{{ checksum "pom.xml" }} - - run: sudo apt install openjdk-8-jdk - - run: mvn --version && whereis java && mvn clean install -Dversion.cassandra22=2.2.19 -Dversion.cassandra30=3.0.28 -Dversion.cassandra311=3.11.14 -Dversion.cassandra4=4.0.7 -Dversion.cassandra41=4.1.0 + - run: sudo apt-get update && sudo apt install openjdk-11-jdk + - run: mvn --version && whereis java && mvn clean install -Dversion.cassandra4=4.0.7 -Dversion.cassandra41=4.1.0 -Dversion.cassandra50=5.0.0 - persist_to_workspace: root: ~/cassandra-ldap paths: - - "cassandra-2.2/target/cassandra-ldap-2.2**.jar" - - "cassandra-3.0/target/cassandra-ldap-3.0*.jar" - - "cassandra-3.11/target/cassandra-ldap-3.11*.jar" - "cassandra-4.0/target/cassandra-ldap-4.0*.jar" - "cassandra-4.1/target/cassandra-ldap-4.1*.jar" + - "cassandra-5.0/target/cassandra-ldap-5.0*.jar" - build-2-2: - machine: - image: ubuntu-2004:202201-02 - - working_directory: ~/cassandra-ldap - - environment: - MAVEN_OPTS: -Xmx3200m - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - steps: - - - checkout - - - restore_cache: - keys: - - m2-{{ checksum "pom.xml" }} - - m2- - - # Java 8 for Cassandra as image contains Java 11 - - run: sudo apt install openjdk-8-jdk - - run: mvn clean install -DoutputDirectory=/tmp/artifacts -DskipTests - - - save_cache: - paths: - - ~/.m2 - key: m2-{{ checksum "pom.xml" }} - - - persist_to_workspace: - root: /tmp/artifacts - paths: - - "cassandra-ldap-2.2*.jar" - - "cassandra-ldap-2.2*.deb" - - "cassandra-ldap-2.2*.rpm" - - build-3-0: - machine: - image: ubuntu-2004:202201-02 - - working_directory: ~/cassandra-ldap - - environment: - MAVEN_OPTS: -Xmx3200m - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - steps: - - - checkout - - - restore_cache: - keys: - - m2-{{ checksum "pom.xml" }} - - m2- - - # Java 8 for Cassandra as image contains Java 11 - - run: sudo apt install openjdk-8-jdk - - run: mvn clean install -DoutputDirectory=/tmp/artifacts - - - save_cache: - paths: - - ~/.m2 - key: m2-{{ checksum "pom.xml" }} - - - persist_to_workspace: - root: /tmp/artifacts - paths: - - "cassandra-ldap-3.0*.jar" - - "cassandra-ldap-3.0*.deb" - - "cassandra-ldap-3.0*.rpm" - - build-3-11: + build-4-0: machine: - image: ubuntu-2004:202201-02 + image: ubuntu-2204:2024.05.1 working_directory: ~/cassandra-ldap @@ -124,8 +52,7 @@ jobs: - m2-{{ checksum "pom.xml" }} - m2- - # Java 8 for Cassandra as image contains Java 11 - - run: sudo apt install openjdk-8-jdk + - run: sudo apt-get update && sudo apt install openjdk-11-jdk - run: mvn clean install -DoutputDirectory=/tmp/artifacts - save_cache: @@ -136,13 +63,13 @@ jobs: - persist_to_workspace: root: /tmp/artifacts paths: - - "cassandra-ldap-3.11*.jar" - - "cassandra-ldap-3.11*.deb" - - "cassandra-ldap-3.11*.rpm" + - "cassandra-ldap-4.0*.jar" + - "cassandra-ldap-4.0*.deb" + - "cassandra-ldap-4.0*.rpm" - build-4-0: + build-4-1: machine: - image: ubuntu-2004:202201-02 + image: ubuntu-2204:2024.05.1 working_directory: ~/cassandra-ldap @@ -159,8 +86,7 @@ jobs: - m2-{{ checksum "pom.xml" }} - m2- - # Java 8 for Cassandra as image contains Java 11 - - run: sudo apt install openjdk-8-jdk + - run: sudo apt-get update && sudo apt install openjdk-11-jdk - run: mvn clean install -DoutputDirectory=/tmp/artifacts - save_cache: @@ -171,13 +97,13 @@ jobs: - persist_to_workspace: root: /tmp/artifacts paths: - - "cassandra-ldap-4.0*.jar" - - "cassandra-ldap-4.0*.deb" - - "cassandra-ldap-4.0*.rpm" + - "cassandra-ldap-4.1*.jar" + - "cassandra-ldap-4.1*.deb" + - "cassandra-ldap-4.1*.rpm" - build-4-1: + build-5-0: machine: - image: ubuntu-2004:202201-02 + image: ubuntu-2204:2024.05.1 working_directory: ~/cassandra-ldap @@ -194,8 +120,7 @@ jobs: - m2-{{ checksum "pom.xml" }} - m2- - # Java 8 for Cassandra as image contains Java 11 - - run: sudo apt install openjdk-8-jdk + - run: sudo apt-get update && sudo apt install openjdk-11-jdk - run: mvn clean install -DoutputDirectory=/tmp/artifacts - save_cache: @@ -206,75 +131,9 @@ jobs: - persist_to_workspace: root: /tmp/artifacts paths: - - "cassandra-ldap-4.1*.jar" - - "cassandra-ldap-4.1*.deb" - - "cassandra-ldap-4.1*.rpm" - - publish-github-release-2-2: - docker: - - image: cimg/go:1.17 - steps: - - attach_workspace: - at: ./artifacts - - run: - name: "Publish 2.2 Release on GitHub" - command: | - set -xue - go get github.com/tcnksm/ghr - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./artifacts/ - - - publish-github-release-3-0: - docker: - - image: cimg/go:1.17 - steps: - - attach_workspace: - at: ./artifacts - - run: - name: "Publish 3.0 Release on GitHub" - command: | - set -xue - go get github.com/tcnksm/ghr - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./artifacts/ - - publish-github-release-3-11: - docker: - - image: cimg/go:1.17 - steps: - - attach_workspace: - at: ./artifacts - - run: - name: "Publish 3.11 Release on GitHub" - command: | - set -xue - go get github.com/tcnksm/ghr - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./artifacts/ - - publish-github-release-4-0: - docker: - - image: cimg/go:1.17 - steps: - - attach_workspace: - at: ./artifacts - - run: - name: "Publish 4.0 Release on GitHub" - command: | - set -xue - go get github.com/tcnksm/ghr - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./artifacts/ - - publish-github-release-4-1: - docker: - - image: cimg/go:1.17 - steps: - - attach_workspace: - at: ./artifacts - - run: - name: "Publish 4.1 Release on GitHub" - command: | - set -xue - go get github.com/tcnksm/ghr - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./artifacts/ + - "cassandra-ldap-5.0*.jar" + - "cassandra-ldap-5.0*.deb" + - "cassandra-ldap-5.0*.rpm" workflows: version: 2 @@ -284,24 +143,6 @@ workflows: filters: tags: only: /^v\d+\.\d+\.\d+$/ - - build-2-2: - filters: - branches: - ignore: /.*/ - tags: - only: /^v2.2.\d+\-\d+\.\d+\.\d+$/ - - build-3-0: - filters: - branches: - ignore: /.*/ - tags: - only: /^v3.0.\d+\-\d+\.\d+\.\d+$/ - - build-3-11: - filters: - branches: - ignore: /.*/ - tags: - only: /^v3.11.\d+\-\d+\.\d+\.\d+$/ - build-4-0: filters: branches: @@ -314,43 +155,9 @@ workflows: ignore: /.*/ tags: only: /^v4.1.\d+-\d+\.\d+\.\d+$/ - - publish-github-release-2-2: - requires: - - build-2-2 - filters: - branches: - ignore: /.*/ - tags: - only: /^v2.2.\d+\-\d+\.\d+\.\d+$/ - - publish-github-release-3-0: - requires: - - build-3-0 - filters: - branches: - ignore: /.*/ - tags: - only: /^v3.0.\d+\-\d+\.\d+\.\d+$/ - - publish-github-release-3-11: - requires: - - build-3-11 - filters: - branches: - ignore: /.*/ - tags: - only: /^v3.11.\d+\-\d+\.\d+\.\d+$/ - - publish-github-release-4-0: - requires: - - build-4-0 - filters: - branches: - ignore: /.*/ - tags: - only: /^v4.0.\d+-\d+\.\d+\.\d+$/ - - publish-github-release-4-1: - requires: - - build-4-1 + - build-5-0: filters: branches: ignore: /.*/ tags: - only: /^v4.1.\d+-\d+\.\d+\.\d+$/ \ No newline at end of file + only: /^v5.0.\d+-\d+\.\d+\.\d+$/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 75c2b0a..79c05bd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ cassandra-3.0/dependency-reduced-pom.xml cassandra-3.11/dependency-reduced-pom.xml cassandra-4.0/dependency-reduced-pom.xml cassandra-4.1/dependency-reduced-pom.xml +cassandra-5.0/dependency-reduced-pom.xml # Compiled class file *.class diff --git a/README.adoc b/README.adoc index 7599197..9ae3c8d 100644 --- a/README.adoc +++ b/README.adoc @@ -12,6 +12,12 @@ and create users based on a configured LDAP server. This implementation provides Role management must be performed through the usual Cassandra role management— CassandraAuthorizer. See **How it works** for more details. +## Deprecation note + +By releasing of Cassandra 5.0, the Cassandra team has stopped to actively develop / support Cassandra versions +3.0 and 3.11. We keep the source code of respective 3.0 and 3.11 modules in the repository, but they are +commented out from main `pom.xml` as they require Java 8 but Cassandra 5.0 requires Java 11 and the testing framework we use for running embedded Cassandra can not deal with Java 11 while testing Cassandra 3.x even we set source and target for Maven to 1.8. If you want to build 3.x modules, please be sure you run Java 8 and you build only the respective module you want. + ## Project Structure and Building This project consists of 5 modules; the `base` module is the module on which all other implementation modules diff --git a/base/pom.xml b/base/pom.xml index 67e0c36..56690b6 100644 --- a/base/pom.xml +++ b/base/pom.xml @@ -21,6 +21,11 @@ Cassandra LDAP Authenticator common code Common code for Apache Cassandra LDAP plugin + + 1.8 + 1.8 + + org.apache.cassandra diff --git a/cassandra-2.2/pom.xml b/cassandra-2.2/pom.xml index 8d17939..7d28003 100644 --- a/cassandra-2.2/pom.xml +++ b/cassandra-2.2/pom.xml @@ -27,6 +27,9 @@ 6.14.3 4.0.3 1.15.3 + + 1.8 + 1.8 diff --git a/cassandra-3.0/pom.xml b/cassandra-3.0/pom.xml index 2e95b1b..16ce057 100644 --- a/cassandra-3.0/pom.xml +++ b/cassandra-3.0/pom.xml @@ -27,6 +27,9 @@ 6.14.3 4.0.3 1.15.3 + + 1.8 + 1.8 diff --git a/cassandra-3.11/pom.xml b/cassandra-3.11/pom.xml index 910c327..86a2875 100644 --- a/cassandra-3.11/pom.xml +++ b/cassandra-3.11/pom.xml @@ -27,6 +27,9 @@ 6.14.3 4.0.3 1.15.3 + + 1.8 + 1.8 diff --git a/cassandra-4.0/pom.xml b/cassandra-4.0/pom.xml index 77b3d44..6940a18 100644 --- a/cassandra-4.0/pom.xml +++ b/cassandra-4.0/pom.xml @@ -27,6 +27,9 @@ 6.14.3 4.0.3 1.15.3 + + 1.8 + 1.8 diff --git a/cassandra-4.1/pom.xml b/cassandra-4.1/pom.xml index e8c283d..05c241d 100644 --- a/cassandra-4.1/pom.xml +++ b/cassandra-4.1/pom.xml @@ -27,6 +27,9 @@ 6.14.3 4.0.3 1.15.3 + + 1.8 + 1.8 diff --git a/cassandra-5.0/pom.xml b/cassandra-5.0/pom.xml index f42dc57..8b972d4 100644 --- a/cassandra-5.0/pom.xml +++ b/cassandra-5.0/pom.xml @@ -27,6 +27,9 @@ 6.14.3 4.0.3 1.15.3 + + 11 + 11 @@ -144,7 +147,7 @@ maven-shade-plugin ${maven.shade.plugin.version} - cassandra-ldap-${version.cassandra41}-${project.version} + cassandra-ldap-${version.cassandra50}-${project.version} diff --git a/pom.xml b/pom.xml index 48ea28d..bce57ed 100644 --- a/pom.xml +++ b/pom.xml @@ -10,9 +10,9 @@ base - cassandra-2.2 - cassandra-3.0 - cassandra-3.11 + + + cassandra-4.0 cassandra-4.1 cassandra-5.0 @@ -75,9 +75,6 @@ ${project.build.directory} UTF-8 - - 1.8 - 1.8