From 72da52c705c819f8a9398859ceee3236edc9380a Mon Sep 17 00:00:00 2001 From: Aaron Loes Date: Thu, 11 Jun 2026 14:08:31 -0500 Subject: [PATCH] Remove Maven as build system, Gradle is now the sole build tool Co-Authored-By: Claude Sonnet 4.6 --- .claude/settings.json | 8 + .devcontainer/Dockerfile | 2 - .devcontainer/devcontainer.json | 3 +- .github/workflows/maven-deploy.yml | 35 ---- CLAUDE.md | 49 ++--- README.md | 16 +- esque-core/pom.xml | 99 --------- .../esque-example-core-aws-auth/pom.xml | 15 -- .../esque-example-core-es-auth/pom.xml | 29 --- .../esque-example-core-simple/pom.xml | 29 --- esque-examples/pom.xml | 86 -------- pom.xml | 188 ------------------ 12 files changed, 36 insertions(+), 523 deletions(-) delete mode 100644 .github/workflows/maven-deploy.yml delete mode 100644 esque-core/pom.xml delete mode 100644 esque-examples/esque-example-core-aws-auth/pom.xml delete mode 100644 esque-examples/esque-example-core-es-auth/pom.xml delete mode 100644 esque-examples/esque-example-core-simple/pom.xml delete mode 100644 esque-examples/pom.xml delete mode 100644 pom.xml diff --git a/.claude/settings.json b/.claude/settings.json index 9a58cb0..863f832 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,4 +1,12 @@ { + "permissions": { + "allow": [ + "Bash(git -C *)", + "Bash(./gradlew :esque-core:test)", + "Bash(./gradlew :esque-core:compileTestKotlin)", + "Bash(./gradlew build)" + ] + }, "enabledPlugins": { "superpowers@claude-plugins-official": true, "skill-creator@claude-plugins-official": true, diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c1e3f33..a665a3a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,6 @@ FROM ubuntu:noble ARG JAVA_VERSION=21.0.5-zulu -ARG MAVEN_VERSION=3.9.9 ARG KOTLIN_VERSION=2.4.0 SHELL ["/bin/bash", "-c"] @@ -20,7 +19,6 @@ USER ${USER} RUN curl -s "https://get.sdkman.io" | bash \ && source ${HOME}/.sdkman/bin/sdkman-init.sh \ && sdk install java ${JAVA_VERSION} \ - && sdk install maven ${MAVEN_VERSION} \ && sdk install kotlin ${KOTLIN_VERSION} # install gh cli diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 442ec0e..c0004ba 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,6 @@ "workspaceFolder": "/workspaces/esque", "postAttachCommand": { - "maven-compile": "mvn compile", - "gradle-build": "./gradlew build", + "gradle-build": "./gradlew build" } } diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml deleted file mode 100644 index 31fc4cc..0000000 --- a/.github/workflows/maven-deploy.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Maven Deploy -on: - workflow_dispatch: - # push: - # branches: [ master ] - # pull_request: - # branches: [ master ] - # release: - # types: [ published ] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 21 - server-id: central - server-username: OSSRH_USERNAME - server-password: OSSRH_PASSWORD - gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} - # helps identify build failures due to expired keys - - run: gpg --list-secret-keys --keyid-format=long - - run: mvn -B -ntp versions:set -DnewVersion=$(./version.sh) - - run: mvn -B -ntp clean deploy - env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - # this env var needs to be named 'MAVEN_GPG_PASSPHRASE'. if a different name is desired, - # it needs to be specified here and in the maven-gpg-plugin configuration variable 'passphraseEnvName' - # see issue: https://github.com/actions/setup-java/issues/668 - MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} diff --git a/CLAUDE.md b/CLAUDE.md index 30ae661..b907a04 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,7 +10,7 @@ Specs live in `.claude/superpowers/specs/` named `YYYY-MM-DD--design.md`. - **License:** Apache 2.0 - **Language:** Kotlin 2.4.0 (JVM 21) -- **Build:** Maven 3.9+ and Gradle 9.5.1 (both supported) +- **Build:** Gradle 9.5.1 - **Target:** Elasticsearch 9+ (client version 9.4.x low-level REST client) - **Published to:** Maven Central via Central Portal @@ -18,7 +18,6 @@ Specs live in `.claude/superpowers/specs/` named `YYYY-MM-DD--design.md`. ``` esque/ -├── pom.xml # Parent POM (multi-module Maven build) ├── build.gradle.kts # Root Gradle build ├── settings.gradle.kts # Gradle settings (module declarations) ├── gradle/ @@ -33,11 +32,9 @@ esque/ │ ├── detekt.yml # Detekt rule configuration │ └── baseline.xml # Baseline of pre-existing violations ├── .github/workflows/ -│ ├── maven-deploy.yml # CI/CD: Maven build + deploy to Maven Central │ └── gradle-deploy.yml # CI/CD: Gradle build + deploy to Maven Central -├── .devcontainer/ # Dev container (Ubuntu, Zulu JDK 21, Maven 3.9) +├── .devcontainer/ # Dev container (Ubuntu, Zulu JDK 21) ├── esque-core/ # Core library (the published artifact) -│ ├── pom.xml │ ├── build.gradle.kts │ └── src/main/kotlin/org/loesak/esque/core/ │ ├── Esque.kt # Main entry point / orchestrator @@ -63,7 +60,7 @@ esque/ ### Prerequisites - Java 21 (Zulu distribution recommended) -- Maven 3.9+ or Gradle (wrapper included — no install needed) +- Gradle (wrapper included — no install needed) ### First-time setup @@ -78,36 +75,25 @@ This sets `core.hooksPath = .githooks` in your local git config. Git won't do th ### Common Commands ```bash -# Maven — compile -mvn clean compile - -# Maven — package (skip GPG signing for local dev) -mvn clean package -Dgpg.skip=true - -# Maven — install to local repo -mvn clean install -Dgpg.skip=true - -# Gradle — compile +# compile ./gradlew compileKotlin -# Gradle — build (compile + test) +# build (compile + test) ./gradlew build -# Gradle — pass version explicitly (mirrors version.sh output) +# pass version explicitly (mirrors version.sh output) ./gradlew -PprojectVersion=1.0.0-SNAPSHOT build -# Gradle — format code +# format code ./gradlew ktfmtFormat -# Gradle — check formatting and lint (without building) +# check formatting and lint (without building) ./gradlew ktfmtCheck detekt ``` ### GPG Signing -**Maven:** All artifacts are GPG-signed for Maven Central deployment. Pass `-Dgpg.skip=true` for local development. CI handles signing automatically via secrets. - -**Gradle:** Signing uses in-memory PGP keys via vanniktech's `signingInPlaceKey` / `signingInPlaceKeyPassword` Gradle properties, supplied as environment variables in CI. No GPG keyring import needed. +Signing uses in-memory PGP keys via vanniktech's `signingInPlaceKey` / `signingInPlaceKeyPassword` Gradle properties, supplied as environment variables in CI. No GPG keyring import needed. ### Versioning @@ -115,8 +101,7 @@ Version is derived from git tags via `version.sh`: - If the tag matches `X.Y.Z` exactly, that version is used as-is - Otherwise, the git describe output gets `-SNAPSHOT` appended -**Maven CI:** `mvn versions:set -DnewVersion=$(./version.sh)` before building. -**Gradle CI:** `-PprojectVersion=$(./version.sh)` passed on the command line. +`-PprojectVersion=$(./version.sh)` is passed on the command line in CI. ### Code Style and Linting @@ -126,12 +111,7 @@ Version is derived from git tags via `version.sh`: ### CI/CD -Two GitHub Actions workflows trigger on push to `master`, pull requests to `master`, and GitHub releases: - -- **`maven-deploy.yml`** — runs `mvn clean deploy`; signs with GPG via `maven-gpg-plugin` -- **`gradle-deploy.yml`** — runs `./gradlew ktfmtCheck detekt build` then `./gradlew publish -x test`; signs in-memory via vanniktech - -Both workflows attempt SNAPSHOT publishing on every run. SNAPSHOT publishing requires the namespace to have snapshots enabled at central.sonatype.com. +`gradle-deploy.yml` triggers on push to `master`, pull requests to `master`, and GitHub releases. It runs `./gradlew ktfmtCheck detekt build` then `./gradlew publish -x test`, signing in-memory via vanniktech. SNAPSHOT publishing requires the namespace to have snapshots enabled at central.sonatype.com. ## Architecture @@ -250,16 +230,13 @@ Integration tests live in `esque-core/src/test/kotlin/` and are named `*IT`. The - **Testcontainers** (`testcontainers-elasticsearch`) to spin up a real ES instance via Docker - **Logback** as the SLF4J implementation (test scope only) -**Maven:** Tests run via `maven-failsafe-plugin` during the `integration-test` phase (`mvn verify`). -**Gradle:** Tests run via the standard `test` task (`./gradlew test`). - -Docker must be available for integration tests to run. +Tests run via the standard `test` task (`./gradlew test`). Docker must be available for integration tests to run. ## Module Notes - **esque-core**: The published library artifact. Contains all core logic. - **esque-examples**: Aggregator with example applications. Not published to Maven Central. -- **esque-example-core-aws-auth**: Placeholder only (POM exists but no implementation). +- **esque-example-core-aws-auth**: Placeholder only (no implementation). ## Known TODOs in Code diff --git a/README.md b/README.md index 512c275..df89b54 100644 --- a/README.md +++ b/README.md @@ -48,12 +48,24 @@ It is Flyway-esque but for Elasticsearch. It basically executes queries and remembers which queries have been run on a cluster for a given migration key. You can organize its usage to your needs. # Install -Add the following to your maven dependencies. Make sure to check the releases or Maven Central for the latest version. +Available on Maven Central. Make sure to check the releases for the latest version. + +**Gradle (Kotlin DSL):** +```kotlin +implementation("org.loesak.esque:esque-core:0.2.1") +``` + +**Gradle (Groovy DSL):** +```groovy +implementation 'org.loesak.esque:esque-core:0.2.1' +``` + +**Maven:** ```xml org.loesak.esque esque-core - 0.1.4 + 0.2.1 ``` diff --git a/esque-core/pom.xml b/esque-core/pom.xml deleted file mode 100644 index c387922..0000000 --- a/esque-core/pom.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - 4.0.0 - - - org.loesak.esque - esque - NONE - - - esque-core - ${artifactId} - - - - org.jetbrains.kotlin - kotlin-stdlib - - - - org.elasticsearch.client - elasticsearch-rest-client - 9.4.2 - - - - tools.jackson.core - jackson-databind - - - tools.jackson.module - jackson-module-kotlin - - - tools.jackson.dataformat - jackson-dataformat-yaml - - - - io.github.oshai - kotlin-logging-jvm - 8.0.4 - - - org.slf4j - slf4j-api - 2.0.18 - - - - ch.qos.logback - logback-classic - 1.5.34 - true - test - - - org.junit.jupiter - junit-jupiter - test - - - org.assertj - assertj-core - 3.27.7 - test - - - org.testcontainers - testcontainers-elasticsearch - test - - - org.testcontainers - testcontainers-junit-jupiter - test - - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 3.5.6 - - - - integration-test - verify - - - - - - - - diff --git a/esque-examples/esque-example-core-aws-auth/pom.xml b/esque-examples/esque-example-core-aws-auth/pom.xml deleted file mode 100644 index b122268..0000000 --- a/esque-examples/esque-example-core-aws-auth/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - - org.loesak.esque - esque-examples - NONE - - - esque-example-core-aws-auth - - \ No newline at end of file diff --git a/esque-examples/esque-example-core-es-auth/pom.xml b/esque-examples/esque-example-core-es-auth/pom.xml deleted file mode 100644 index 4a3036d..0000000 --- a/esque-examples/esque-example-core-es-auth/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - 4.0.0 - - - org.loesak.esque - esque-examples - NONE - - - esque-example-core-es-auth - - - - org.loesak.esque - esque-core - ${project.version} - - - - ch.qos.logback - logback-classic - 1.5.34 - - - - \ No newline at end of file diff --git a/esque-examples/esque-example-core-simple/pom.xml b/esque-examples/esque-example-core-simple/pom.xml deleted file mode 100644 index abf05d9..0000000 --- a/esque-examples/esque-example-core-simple/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - 4.0.0 - - - org.loesak.esque - esque-examples - NONE - - - esque-example-core-simple - - - - org.loesak.esque - esque-core - ${project.version} - - - - ch.qos.logback - logback-classic - 1.5.34 - - - - \ No newline at end of file diff --git a/esque-examples/pom.xml b/esque-examples/pom.xml deleted file mode 100644 index 352cd39..0000000 --- a/esque-examples/pom.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - 4.0.0 - - - org.loesak.esque - esque - NONE - - - esque-examples - pom - - - esque-example-core-simple - esque-example-core-es-auth - esque-example-core-aws-auth - - - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - none - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - none - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - none - - - - - org.sonatype.central - central-publishing-maven-plugin - false - - - injected-central-publishing - none - - - - true - - - - org.apache.maven.plugins - maven-install-plugin - - true - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml deleted file mode 100644 index f984c0d..0000000 --- a/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ - - 4.0.0 - - org.loesak.esque - esque - NONE - pom - - esque - Resembles an Elasticsearch Stateful Query Executor - https://github.com/loesak/esque - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - Aaron Loes - aaron.loes@gmail.com - Loesak - https://github.com/loesak/esque - - - - - scm:git:git://github.com/loesak/esque.git - scm:git:ssh://github.com:loesak/esque.git - https://github.com/loesak/esque - - - - esque-core - esque-examples - - - - 21 - ${java.version} - UTF-8 - 2.4.0 - - - - - - org.jetbrains.kotlin - kotlin-bom - ${kotlin.version} - pom - import - - - tools.jackson - jackson-bom - 3.1.4 - pom - import - - - org.junit - junit-bom - 6.1.0 - pom - import - - - org.testcontainers - testcontainers-bom - 2.0.5 - pom - import - - - - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - ${kotlin.version} - - - compile - compile - - - ${project.basedir}/src/main/kotlin - - - - - test-compile - test-compile - - - ${project.basedir}/src/test/kotlin - - - - - - ${java.version} - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.13.0 - - - default-compile - none - - - default-testCompile - none - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.5.6 - - - org.apache.maven.plugins - maven-source-plugin - 3.3.1 - - - attach-sources - - jar - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.12.0 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.8 - - true - - - - sign-artifacts - verify - - sign - - - - - - org.sonatype.central - central-publishing-maven-plugin - 0.10.0 - true - - central - true - published - - - - -