diff --git a/CHANGELOG.md b/CHANGELOG.md index e8fb8529..71a25256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,24 +6,26 @@ follow semantic versioning; release dates are ISO 8601. ## v1.6.6 — Planned **First Maven Central release.** GraphCompose now ships under -`io.github.demchaav:graphcompose:1.6.6` alongside the existing -JitPack distribution. The release adds publishable sources/javadoc -jars, GPG-signed artefacts, a binary-compatibility gate against -v1.6.5, the metadata Maven Central requires, and a substantial -documentation polish for the maturity / stability / migration story. +`io.github.demchaav:graph-compose:1.6.6` — note the **hyphenated** +artifactId, chosen for readability ahead of the Central debut. The +release adds publishable sources/javadoc jars, GPG-signed artefacts, +a binary-compatibility gate against v1.6.5, the metadata Maven +Central requires, and a substantial documentation polish for the +maturity / stability / migration story. **Zero breaking changes from v1.6.5.** Existing JitPack callers continue -to resolve through the same coordinates; existing API surface compiles -and runs unchanged (validated by the new `japicmp` gate against the -v1.6.5 baseline). New: the `@Beta` annotation marker, the `@since 1.0.0` -class-level Javadoc on entry-point packages, and a curated docs pass -(decision guide for the two template surfaces, examples maturity index, -explicit API stability policy). - -**Migration from v1.6.5:** no code changes required. Optionally swap -the JitPack `` for the Maven Central equivalent -(`io.github.demchaav:graphcompose:1.6.6`); both publish paths continue -to ship the same artefact. +to resolve through the same coordinates (`com.github.DemchaAV:GraphCompose:v1.6.5`); +existing API surface compiles and runs unchanged (validated by the new +`japicmp` gate against the v1.6.5 baseline). New: the `@Beta` +annotation marker, the `@since 1.0.0` class-level Javadoc on +entry-point packages, and a curated docs pass (decision guide for +the two template surfaces, examples maturity index, explicit API +stability policy). + +**Migration from v1.6.5:** no code changes required. Swap the +JitPack `` for the Maven Central form +(`io.github.demchaav:graph-compose:1.6.6`). The legacy JitPack URL +keeps resolving for callers pinned to v1.6.5 and earlier. ### Build @@ -63,7 +65,7 @@ to ship the same artefact. alongside the existing JitPack step. - **Hosted Javadocs via `javadoc.io`** (Track H3). README's distribution-status note now points callers at - [javadoc.io/doc/io.github.demchaav/graphcompose](https://javadoc.io/doc/io.github.demchaav/graphcompose), + [javadoc.io/doc/io.github.demchaav/graph-compose](https://javadoc.io/doc/io.github.demchaav/graph-compose), which auto-mirrors any artefact published to Maven Central within minutes — no separate hosting infrastructure required. The note also pins Maven Central as the going-forward primary distribution diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90468f17..92fb93a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,7 +78,7 @@ GraphCompose follows a fork → feature branch → pull request flow. Exte 1. **Release prep** lands on `develop` — version bumps propagate via `aggregator/pom.xml` to all modules in one pass; fresh CHANGELOG entry; migration guide for minor releases. **README install snippet stays pinned to the previously published version** until Maven Central confirms the new artifact, otherwise consumers copying the snippet during the publish window hit a 404. 2. **`scripts/cut-release.ps1 -Version `** automates the bump + CHANGELOG date + commit + tag + push from `develop`. The maintainer fast-forwards `main` from `develop` after the tag lands (`git push origin develop:main`). -3. **Maven Central** picks up the new tag automatically via [`.github/workflows/publish.yml`](./.github/workflows/publish.yml) — the workflow re-runs `mvnw verify` at the tagged commit, signs the four artefacts (main / sources / javadoc / pom) with the repo's GPG key, and uploads via the `central-publishing-maven-plugin`. Hyphenated tags (`-rc`, `-alpha`, `-beta`) are skipped on Central; they ship only to the GitHub Release pre-release surface. Javadocs auto-publish to [javadoc.io/doc/io.github.demchaav/graphcompose](https://javadoc.io/doc/io.github.demchaav/graphcompose) shortly after each Central release. +3. **Maven Central** picks up the new tag automatically via [`.github/workflows/publish.yml`](./.github/workflows/publish.yml) — the workflow re-runs `mvnw verify` at the tagged commit, signs the four artefacts (main / sources / javadoc / pom) with the repo's GPG key, and uploads via the `central-publishing-maven-plugin`. Hyphenated tags (`-rc`, `-alpha`, `-beta`) are skipped on Central; they ship only to the GitHub Release pre-release surface. Javadocs auto-publish to [javadoc.io/doc/io.github.demchaav/graph-compose](https://javadoc.io/doc/io.github.demchaav/graph-compose) shortly after each Central release. 4. **GitHub Release** is created with notes from the matching `CHANGELOG.md` section. See [docs/contributing/release-process.md](./docs/contributing/release-process.md) for the full checklist (audit gates, hotfix protocol, lessons learned). diff --git a/README.md b/README.md index f35d9880..f801bbc0 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@

CI Latest release - Maven Central + Maven Central Java 17+ PDFBox 3.0 MIT License @@ -96,18 +96,18 @@ GraphCompose uses PDFBox under the hood as the rendering backend — the com ```xml io.github.demchaav - graphcompose + graph-compose 1.6.6 ``` ```kotlin -dependencies { implementation("io.github.demchaav:graphcompose:1.6.6") } +dependencies { implementation("io.github.demchaav:graph-compose:1.6.6") } ``` > **Distribution** — Maven Central is the canonical channel from **v1.6.6** onwards -> (`io.github.demchaav:graphcompose:`). Hosted Javadocs auto-publish to -> [javadoc.io/doc/io.github.demchaav/graphcompose](https://javadoc.io/doc/io.github.demchaav/graphcompose) +> (`io.github.demchaav:graph-compose:`). Hosted Javadocs auto-publish to +> [javadoc.io/doc/io.github.demchaav/graph-compose](https://javadoc.io/doc/io.github.demchaav/graph-compose) > shortly after each Central release. The legacy JitPack URL > (`com.github.DemchaAV:GraphCompose:v`) remains resolvable for callers > pinned to v1.6.5 and earlier but is no longer the documented install option. diff --git a/ROADMAP.md b/ROADMAP.md index efa105ed..46eaa820 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -8,7 +8,7 @@ In flight on `main` / `develop`. - v1.6 polish — documentation, examples, visual baselines, fixes. - Open-source hygiene — security policy, support guidance, dependency automation, security scanning. -- **Maven Central distribution** — debut shipping in v1.6.6 under `io.github.demchaav:graphcompose`. Replaces JitPack as the primary install channel; the JitPack URL stays alive for existing pinned consumers but is no longer documented as a primary option. Tracked in [#7](https://github.com/DemchaAV/GraphCompose/issues/7). +- **Maven Central distribution** — debut shipping in v1.6.6 under `io.github.demchaav:graph-compose`. Replaces JitPack as the primary install channel; the JitPack URL stays alive for existing pinned consumers but is no longer documented as a primary option. Tracked in [#7](https://github.com/DemchaAV/GraphCompose/issues/7). ## Next (v1.7) @@ -23,7 +23,7 @@ Not committed. Reflects current thinking; priorities may shift based on user fee - **DOCX visibility for unsupported nodes.** Make currently-silent skips (`shape`, `line`, `ellipse`, `barcode`) loud — minimum a warn log, ideally a strict-mode flag that fails instead of dropping content silently. - **Backend-neutral layout measurement.** Decouple measurement from PDFBox-specific resources so non-PDF backends do not pull PDFBox into the dependency graph. -- **Multi-module Maven layout.** Split the artifact into `graphcompose-core` / `graphcompose-pdf` / `graphcompose-docx` / `graphcompose-templates` / `graphcompose-testing` if there is clear demand. Adds release complexity, so requires a real adoption signal first. +- **Multi-module Maven layout.** Split the artifact into `graph-compose-core` / `graph-compose-pdf` / `graph-compose-docx` / `graph-compose-templates` / `graph-compose-testing` if there is clear demand. Adds release complexity, so requires a real adoption signal first. - **DOCX maturity.** Either expand DOCX coverage toward PDF parity, or move DOCX behind an explicitly experimental flag. - **Property-based testing.** Random table spans, pagination edge cases, deeply nested layouts. - **Real PPTX export.** Current state is a manifest skeleton. Will only be built out if there is concrete user demand. diff --git a/SECURITY.md b/SECURITY.md index b1625ec5..b9a182f4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -47,7 +47,7 @@ In scope: - DOCX / PPTX semantic backends (`com.demcha.compose.document.backend.semantic`). - Templates shipped in `com.demcha.compose.document.templates`. - Public authoring API (`GraphCompose`, `DocumentSession`, DSL). -- Build and release artifacts on Maven Central (`io.github.demchaav:graphcompose`). The legacy JitPack URL remains available for consumers pinned to v1.6.5 and earlier but is no longer the documented install channel. +- Build and release artifacts on Maven Central (`io.github.demchaav:graph-compose`). The legacy JitPack URL remains available for consumers pinned to v1.6.5 and earlier but is no longer the documented install channel. Out of scope: diff --git a/aggregator/pom.xml b/aggregator/pom.xml index 9b6e88ba..7f739567 100644 --- a/aggregator/pom.xml +++ b/aggregator/pom.xml @@ -5,7 +5,7 @@ 4.0.0 io.github.demchaav - graphcompose-build + graph-compose-build 1.6.5 pom diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 443d1a21..0e499afe 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -6,12 +6,12 @@ io.github.demchaav - graphcompose-build + graph-compose-build 1.6.5 ../aggregator/pom.xml - graphcompose-benchmarks + graph-compose-benchmarks GraphCompose Benchmarks Performance benchmarks, stress tests, and endurance harnesses for @@ -49,19 +49,19 @@ io.github.demchaav - graphcompose + graph-compose ${graphcompose.version} io.github.demchaav - graphcompose + graph-compose ${graphcompose.version} test-jar tests diff --git a/docs/contributing/release-process.md b/docs/contributing/release-process.md index d3201de0..f5e5827d 100644 --- a/docs/contributing/release-process.md +++ b/docs/contributing/release-process.md @@ -2,7 +2,7 @@ This is the canonical release runbook for GraphCompose 1.x. -- Maven Central — `io.github.demchaav:graphcompose:` (canonical, from v1.6.6) +- Maven Central — `io.github.demchaav:graph-compose:` (canonical, from v1.6.6) - JitPack — `com.github.DemchaAV:GraphCompose:v` (legacy; resolves for callers pinned to v1.6.5 and earlier, no longer the documented install channel) The release workflow is automated by [`scripts/cut-release.ps1`](../scripts/cut-release.ps1). The script must run from the `develop` branch with a clean working tree. The agent (Claude / Codex) **must complete every audit gate below before a release tag is cut**, and **must wait for explicit human approval** ("yes, cut the tag" / "делаем тег") before invoking the script. @@ -45,7 +45,7 @@ The shell setup and exact PowerShell commands live in the `graphcompose-release- The script's Step 1–4 mutates these. The agent only confirms the *current state is one the script can transition from*: -- [ ] The version lives in four sites that must stay in lockstep: the standalone library `pom.xml`, the reactor `aggregator/pom.xml`, and the inherited `` version of `examples/pom.xml` and `benchmarks/pom.xml` (the children no longer pin their own `` — they inherit from `graphcompose-build`, and declare `${project.version}` rather than a literal). All four read the same value: either the in-flight develop value or already the target. `VersionConsistencyGuardTest` asserts they agree; `cut-release.ps1` Step 1 moves all four (plus the README) together. Bumping by hand outside the script — or `mvn versions:set` on a single pom — is what previously left benchmarks on the prior release; if you must bump outside the script, use `mvn -f aggregator/pom.xml versions:set -DnewVersion=`. +- [ ] The version lives in four sites that must stay in lockstep: the standalone library `pom.xml`, the reactor `aggregator/pom.xml`, and the inherited `` version of `examples/pom.xml` and `benchmarks/pom.xml` (the children no longer pin their own `` — they inherit from `graph-compose-build`, and declare `${project.version}` rather than a literal). All four read the same value: either the in-flight develop value or already the target. `VersionConsistencyGuardTest` asserts they agree; `cut-release.ps1` Step 1 moves all four (plus the README) together. Bumping by hand outside the script — or `mvn versions:set` on a single pom — is what previously left benchmarks on the prior release; if you must bump outside the script, use `mvn -f aggregator/pom.xml versions:set -DnewVersion=`. - [ ] `examples/src/main/java/com/demcha/examples/support/ShowcaseMetadata.java` `GH_BASE` points to `/blob/develop`. The script flips it to `/blob/v` and regenerates `docs/examples.json`. ### E. Tag must not exist @@ -86,7 +86,7 @@ The script does **not** handle these. They are either pre-release or post-releas Run within 1 hour of the tag push. Independent steps can run in parallel. -1. **Wait for Maven Central artefact** — once `.github/workflows/publish.yml` turns green (see step 9 below), poll `mvn dependency:get -DgroupId=io.github.demchaav -DartifactId=graphcompose -Dversion=` until it resolves (usually 5–15 minutes after the workflow finishes). Then: +1. **Wait for Maven Central artefact** — once `.github/workflows/publish.yml` turns green (see step 9 below), poll `mvn dependency:get -DgroupId=io.github.demchaav -DartifactId=graph-compose -Dversion=` until it resolves (usually 5–15 minutes after the workflow finishes). Then: 2. **README install snippets** — already flipped to `` by `cut-release.ps1` in the release commit (section 1, Step 2/6) and enforced by `VersionConsistencyGuardTest`. No separate post-release commit is needed; just confirm the Central artefact resolves (step 1 above) means the version the README now advertises actually exists. 3. **Merge `develop` → `main`** on GitHub so GitHub Pages picks up the new docs. Fast-forward only — never force-push `main`. If the push is rejected with `non-fast-forward`, a hotfix landed on `main` after the audit and the merge has to be redone after merging `origin/main` back into `develop`. 4. **Verify CI green on main** — `gh run list --branch main --limit 1` shows `success` for the tag commit. @@ -94,7 +94,7 @@ Run within 1 hour of the tag push. Independent steps can run in parallel. 6. **Re-run all examples against the published artifact** — `./mvnw -f examples/pom.xml clean package` followed by `exec:java -Dexec.mainClass=com.demcha.examples.GenerateAllExamples`. Expect 26+ `Generated:` lines. 7. **Flip ShowcaseMetadata back to develop** — `pwsh ./scripts/cut-release.ps1 -PostReleaseOnly`. This restores linkable "View Code" buttons for ongoing v1.x.y dev work. 8. **GitHub Release — automated.** Pushing the `v` tag triggers [`.github/workflows/release.yml`](../../.github/workflows/release.yml): it re-runs `./mvnw clean verify -pl .` against the tagged commit, then creates the Release with that version's CHANGELOG section as the body (hyphenated tags like `v1.7.0-rc.1` ship as pre-releases; the step is idempotent — it edits the notes if the Release already exists). The workflow titles it `GraphCompose v`; for a **minor** release, edit the title to add the codename (`v1.4`=cinematic, `v1.5`=intuitive, `v1.6`=expressive; patches drop it). Create the Release by hand (`gh release create v --notes-file `) only if the workflow is unavailable. -9. **Maven Central publish — automated (from v1.6.6).** The same `v` tag push triggers [`.github/workflows/publish.yml`](../../.github/workflows/publish.yml): it re-runs `mvnw verify` at the tagged commit, signs the four artefacts (main / sources / javadoc / pom) with the repo's GPG key, and uploads to Maven Central via the `central-publishing-maven-plugin`. Hyphenated tags (`-rc`, `-alpha`, `-beta`, `-snapshot`) are skipped — those go only to the GitHub Release pre-release surface. `autoPublish=false` in the plugin config means the artefact lands in the Central validation queue; the maintainer flips the switch on [central.sonatype.com](https://central.sonatype.com) for the first publish, then can opt into auto-release in a follow-up. Verify via `mvn dependency:get -DgroupId=io.github.demchaav -DartifactId=graphcompose -Dversion=` once the artifact appears (usually 5–15 minutes after the workflow turns green). +9. **Maven Central publish — automated (from v1.6.6).** The same `v` tag push triggers [`.github/workflows/publish.yml`](../../.github/workflows/publish.yml): it re-runs `mvnw verify` at the tagged commit, signs the four artefacts (main / sources / javadoc / pom) with the repo's GPG key, and uploads to Maven Central via the `central-publishing-maven-plugin`. Hyphenated tags (`-rc`, `-alpha`, `-beta`, `-snapshot`) are skipped — those go only to the GitHub Release pre-release surface. `autoPublish=false` in the plugin config means the artefact lands in the Central validation queue; the maintainer flips the switch on [central.sonatype.com](https://central.sonatype.com) for the first publish, then can opt into auto-release in a follow-up. Verify via `mvn dependency:get -DgroupId=io.github.demchaav -DartifactId=graph-compose -Dversion=` once the artifact appears (usually 5–15 minutes after the workflow turns green). 10. **Optional**: GitHub Discussions announcement (mirror the prior release's style; close with *"author intent, not coordinates"*), LinkedIn post, r/java post. The release is **done** only when steps 1–7 are all green; step 9 adds Maven Central availability once the D-track of v1.6.6 has shipped. @@ -190,7 +190,7 @@ The release is **done** when all of these are true: - [ ] GitHub Release created with the CHANGELOG `v` body - [ ] CI green on `main` for the tag commit - [ ] `.github/workflows/publish.yml` succeeded for the tag -- [ ] Maven Central artefact resolves: `mvn dependency:get -DgroupId=io.github.demchaav -DartifactId=graphcompose -Dversion=` exit 0 +- [ ] Maven Central artefact resolves: `mvn dependency:get -DgroupId=io.github.demchaav -DartifactId=graph-compose -Dversion=` exit 0 - [ ] `mvn dependency:resolve` succeeds against the README install snippet - [ ] README install snippets read `` (flipped by the release commit; `VersionConsistencyGuardTest` green) - [ ] `develop` and `main` synced at the same SHA diff --git a/docs/index.html b/docs/index.html index a8cbdf48..4896c89e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -59,7 +59,7 @@ "programmingLanguage": "Java", "softwareVersion": "1.6.6", "url": "https://demchaav.github.io/GraphCompose/", - "downloadUrl": "https://central.sonatype.com/artifact/io.github.demchaav/graphcompose/1.6.6", + "downloadUrl": "https://central.sonatype.com/artifact/io.github.demchaav/graph-compose/1.6.6", "image": "https://demchaav.github.io/GraphCompose/assets/logo/graphcompose-logo.png", "license": "https://github.com/DemchaAV/GraphCompose/blob/main/LICENSE", "author": { @@ -232,7 +232,7 @@

Maven Central. One dependency.

Maven

<dependency>
   <groupId>io.github.demchaav</groupId>
-  <artifactId>graphcompose</artifactId>
+  <artifactId>graph-compose</artifactId>
   <version>1.6.6</version>
 </dependency>
@@ -240,7 +240,7 @@

Maven

Gradle

dependencies {
   implementation(
-    'io.github.demchaav:graphcompose:1.6.6'
+    'io.github.demchaav:graph-compose:1.6.6'
   )
 }
diff --git a/docs/roadmaps/v1.6-roadmap.md b/docs/roadmaps/v1.6-roadmap.md index 198565a7..fbfa2319 100644 --- a/docs/roadmaps/v1.6-roadmap.md +++ b/docs/roadmaps/v1.6-roadmap.md @@ -186,7 +186,7 @@ v1.6.5 and earlier but is no longer the documented install option. - GPG signing of release artifacts - `central-publishing-maven-plugin` configuration in `pom.xml` - README install snippet switches to - `io.github.demchaav:graphcompose:` as the only documented form + `io.github.demchaav:graph-compose:` as the only documented form - automated deployment via GitHub Actions on tag push (`.github/workflows/publish.yml`) @@ -215,7 +215,7 @@ tooling without changing the published numbers' meaning. - **Separate `benchmarks/` Maven module.** Mirrors the existing `examples/` module pattern. Pull benchmark code out of test scope into a self-contained module that depends on the published - `graphcompose` artifact. Build a self-executing JMH jar via + `graph-compose` artifact. Build a self-executing JMH jar via `maven-shade-plugin`; run via `java -jar benchmarks/target/benchmarks.jar` with optional `-rf json -rff results.json` for CI-friendly output. @@ -326,7 +326,7 @@ roadmap: ## Release identity -- Maven Central coordinates `io.github.demchaav:graphcompose:` (canonical; debut at 1.6.6) +- Maven Central coordinates `io.github.demchaav:graph-compose:` (canonical; debut at 1.6.6) - Tag `vX.Y.Z` on `main` after develop merge - Migration guide at `docs/roadmaps/migration-v1-5-to-v1-6.md` diff --git a/docs/templates/which-template-system.md b/docs/templates/which-template-system.md index a55335d3..4e4bcece 100644 --- a/docs/templates/which-template-system.md +++ b/docs/templates/which-template-system.md @@ -207,8 +207,8 @@ private taskboard. ### Maven coordinates do **not** change in 2.0 -The library `pom.xml` artifact id stays `graphcompose`. The Maven Central -coordinates introduced in 1.6.6 (`io.github.demchaav:graphcompose:`) +The library `pom.xml` artifact id stays `graph-compose`. The Maven Central +coordinates introduced in 1.6.6 (`io.github.demchaav:graph-compose:`) carry through to 2.0 unchanged. The legacy JitPack URL (`com.github.DemchaAV:GraphCompose:v`) remains resolvable for callers pinned to v1.6.5 and earlier but is not the documented install channel. diff --git a/examples/pom.xml b/examples/pom.xml index 1480f369..f50d629a 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -6,12 +6,12 @@ io.github.demchaav - graphcompose-build + graph-compose-build 1.6.5 ../aggregator/pom.xml - graphcompose-examples + graph-compose-examples GraphCompose Examples Runnable file-render examples for GraphCompose templates. @@ -40,7 +40,7 @@ io.github.demchaav - graphcompose + graph-compose ${graphcompose.version} diff --git a/pom.xml b/pom.xml index 68844cfc..268b98f6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 io.github.demchaav - graphcompose + graph-compose 1.6.5 GraphCompose @@ -430,7 +430,7 @@ Publish a tests-classifier jar so the sibling `benchmarks/` module can reuse the test-only fixtures (com.demcha.mock.*, etc.) without duplicating them. The artifact is - graphcompose-${version}-tests.jar in the local repository + graph-compose-${version}-tests.jar in the local repository after `mvn install`. --> diff --git a/scripts/cut-release.ps1 b/scripts/cut-release.ps1 index 57a989ae..8e60cd7c 100644 --- a/scripts/cut-release.ps1 +++ b/scripts/cut-release.ps1 @@ -175,7 +175,7 @@ function Update-ReadmeInstallVersion($readmePath, $newVersion) { # (GraphCompose / GraphCompose:vX.Y.Z) so # the script still works if a future change re-introduces a JitPack # snippet for documentation purposes. - $mavenCentralRegex = [regex]'(?<=graphcompose\s*)v?[\w\.\-]+(?=)' + $mavenCentralRegex = [regex]'(?<=graph-compose\s*)v?[\w\.\-]+(?=)' $afterMaven = $mavenCentralRegex.Replace($content, $newVersion, 1) if ($content -ne $afterMaven) { $content = $afterMaven @@ -191,7 +191,7 @@ function Update-ReadmeInstallVersion($readmePath, $newVersion) { } } - $gradleCentralRegex = [regex]'(?<=io\.github\.demchaav:graphcompose:)v?[\w\.\-]+(?=")' + $gradleCentralRegex = [regex]'(?<=io\.github\.demchaav:graph-compose:)v?[\w\.\-]+(?=")' $afterGradle = $gradleCentralRegex.Replace($content, $newVersion, 1) if ($content -ne $afterGradle) { $content = $afterGradle @@ -238,10 +238,10 @@ function Update-IndexHtmlVersion($indexHtmlPath, $newVersion) { # so only the version token is rewritten. $replacements = @( @{ Regex = [regex]'(?<="softwareVersion": ")v?[\w\.\-]+(?=")'; Value = $newVersion; Label = 'JSON-LD softwareVersion' }, - @{ Regex = [regex]'(?<=https://central\.sonatype\.com/artifact/io\.github\.demchaav/graphcompose/)v?[\w\.\-]+(?=")'; Value = $newVersion; Label = 'Central downloadUrl' }, + @{ Regex = [regex]'(?<=https://central\.sonatype\.com/artifact/io\.github\.demchaav/graph-compose/)v?[\w\.\-]+(?=")'; Value = $newVersion; Label = 'Central downloadUrl' }, @{ Regex = [regex]'(?<=Java · )v?[\w\.\-]+(?= · MIT)'; Value = $tag; Label = 'hero badge' }, - @{ Regex = [regex]'(?<=<artifactId>graphcompose</artifactId>\s*<version>)v?[\w\.\-]+(?=</version>)'; Value = $newVersion; Label = 'Maven Central snippet' }, - @{ Regex = [regex]"(?<=io\.github\.demchaav:graphcompose:)v?[\w\.\-]+(?=')"; Value = $newVersion; Label = 'Gradle Central snippet' } + @{ Regex = [regex]'(?<=<artifactId>graph-compose</artifactId>\s*<version>)v?[\w\.\-]+(?=</version>)'; Value = $newVersion; Label = 'Maven Central snippet' }, + @{ Regex = [regex]"(?<=io\.github\.demchaav:graph-compose:)v?[\w\.\-]+(?=')"; Value = $newVersion; Label = 'Gradle Central snippet' } ) foreach ($r in $replacements) { diff --git a/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java b/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java index de8943b1..c4fdd294 100644 --- a/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java +++ b/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java @@ -132,18 +132,22 @@ void showcaseSiteVersionMatchesTheProjectVersion() throws Exception { // window). The first regex with a match wins. private static final String[] INSTALL_SNIPPET_PATTERNS_README_MAVEN = { + "graph-compose\\s*v?([0-9][^<]*)", "graphcompose\\s*v?([0-9][^<]*)", "GraphCompose\\s*v?([0-9][^<]*)" }; private static final String[] INSTALL_SNIPPET_PATTERNS_README_GRADLE = { + "io\\.github\\.demchaav:graph-compose:v?([0-9][^\")]*)", "io\\.github\\.demchaav:graphcompose:v?([0-9][^\")]*)", "GraphCompose:v?([0-9][^\")]*)" }; private static final String[] INSTALL_SNIPPET_PATTERNS_SHOWCASE_MAVEN = { + "<artifactId>graph-compose</artifactId>\\s*<version>v?([0-9][^&]*)</version>", "<artifactId>graphcompose</artifactId>\\s*<version>v?([0-9][^&]*)</version>", "<version>v?([0-9][^&]*)</version>" }; private static final String[] INSTALL_SNIPPET_PATTERNS_SHOWCASE_GRADLE = { + "io\\.github\\.demchaav:graph-compose:v?([0-9][^')]*)", "io\\.github\\.demchaav:graphcompose:v?([0-9][^')]*)", "GraphCompose:v?([0-9][^')]*)" };