From 5aba181bb57c9b6c7fa3a403689a438a9169a58d Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:43:16 +0200 Subject: [PATCH] docs: revise URL structure (libraries) (#862) --- README.md | 8 ++++---- build.sbt | 12 +++++------ .../jdbc/testkit/javadsl/SchemaUtils.scala | 20 +++++++++---------- .../jdbc/testkit/scaladsl/SchemaUtils.scala | 20 +++++++++---------- docs/release-train-issue-template.md | 6 +++--- docs/src/main/paradox/snapshots.md | 2 +- project/Dependencies.scala | 2 +- project/ProjectAutoPlugin.scala | 2 +- scripts/link-validator.conf | 6 +++--- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 2b100a7b3..2cb625b76 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ Please note that the H2 database is not recommended to be used as a production d ## Documentation -* [current Akka Persistence JDBC documentation](https://doc.akka.io/docs/akka-persistence-jdbc/current/) -* [Akka Persistence JDBC 3.5.x documentation](https://doc.akka.io/docs/akka-persistence-jdbc/3.5/) -* [Snapshot documentation](https://doc.akka.io/docs/akka-persistence-jdbc/snapshot/) +* [current Akka Persistence JDBC documentation](https://doc.akka.io/libraries/akka-persistence-jdbc/current/) +* [Akka Persistence JDBC 3.5.x documentation](https://doc.akka.io/libraries/akka-persistence-jdbc/3.5/) +* [Snapshot documentation](https://doc.akka.io/libraries/akka-persistence-jdbc/snapshot/) ## Release notes @@ -49,4 +49,4 @@ You can also ask for clarifications or guidance in GitHub issues directly, or in Akka is licensed under the Business Source License 1.1, please see the [Akka License FAQ](https://www.lightbend.com/akka/license-faq). -Tests and documentation are under a separate license, see the LICENSE file in each documentation and test root directory for details. \ No newline at end of file +Tests and documentation are under a separate license, see the LICENSE file in each documentation and test root directory for details. diff --git a/build.sbt b/build.sbt index e0e742511..f6f81540a 100644 --- a/build.sbt +++ b/build.sbt @@ -67,11 +67,11 @@ lazy val docs = project Preprocess / siteSubdirName := s"api/akka-persistence-jdbc/${if (isSnapshot.value) "snapshot" else version.value}", Preprocess / sourceDirectory := (LocalRootProject / ScalaUnidoc / unidoc / target).value, - Paradox / siteSubdirName := s"docs/akka-persistence-jdbc/${if (isSnapshot.value) "snapshot" else version.value}", + Paradox / siteSubdirName := s"libraries/akka-persistence-jdbc/${if (isSnapshot.value) "snapshot" else version.value}", Compile / paradoxProperties ++= Map( - "project.url" -> "https://doc.akka.io/docs/akka-persistence-jdbc/current/", + "project.url" -> "https://doc.akka.io/libraries/akka-persistence-jdbc/current/", "github.base_url" -> "https://github.com/akka/akka-persistence-jdbc/", - "canonical.base_url" -> "https://doc.akka.io/docs/akka-persistence-jdbc/current", + "canonical.base_url" -> "https://doc.akka.io/libraries/akka-persistence-jdbc/current", "akka.version" -> Dependencies.AkkaVersion, "slick.version" -> Dependencies.SlickVersion, "extref.github.base_url" -> s"https://github.com/akka/akka-persistence-jdbc/blob/${if (isSnapshot.value) "master" @@ -79,9 +79,9 @@ lazy val docs = project // Slick "extref.slick.base_url" -> s"https://scala-slick.org/doc/${Dependencies.SlickVersion}/%s", // Akka - "extref.akka.base_url" -> s"https://doc.akka.io/docs/akka/${Dependencies.AkkaBinaryVersion}/%s", - "scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka/${Dependencies.AkkaBinaryVersion}/", - "javadoc.akka.base_url" -> s"https://doc.akka.io/japi/akka/${Dependencies.AkkaBinaryVersion}/", + "extref.akka.base_url" -> s"https://doc.akka.io/libraries/akka-core/${Dependencies.AkkaBinaryVersion}/%s", + "scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka-core/${Dependencies.AkkaBinaryVersion}/", + "javadoc.akka.base_url" -> s"https://doc.akka.io/japi/akka-core/${Dependencies.AkkaBinaryVersion}/", "javadoc.akka.link_style" -> "direct", // Java "javadoc.base_url" -> "https://docs.oracle.com/javase/8/docs/api/", diff --git a/core/src/main/scala/akka/persistence/jdbc/testkit/javadsl/SchemaUtils.scala b/core/src/main/scala/akka/persistence/jdbc/testkit/javadsl/SchemaUtils.scala index 5c594e305..b252b396b 100644 --- a/core/src/main/scala/akka/persistence/jdbc/testkit/javadsl/SchemaUtils.scala +++ b/core/src/main/scala/akka/persistence/jdbc/testkit/javadsl/SchemaUtils.scala @@ -23,14 +23,14 @@ object SchemaUtils { * Drops the schema for both the journal and the snapshot table using the default schema definition. * * For information about the different schemas and supported databases consult - * https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#database-schema + * https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#database-schema * * This utility method is intended to be used for testing only. * For production, it's recommended to run any DDL statements before the system is started. * * This method will automatically detects the configured database using the settings from `jdbc-journal` config. * If configured with `use-shared-db`, it will use the `akka-persistence-jdbc.shared-databases` definition instead. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. */ @ApiMayChange def dropIfExists(actorSystem: ClassicActorSystemProvider): CompletionStage[Done] = @@ -40,14 +40,14 @@ object SchemaUtils { * Drops the schema for both the journal and the snapshot table using the default schema definition. * * For information about the different schemas and supported databases consult - * https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#database-schema + * https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#database-schema * * This utility method is intended to be used for testing only. * For production, it's recommended to run any DDL statements before the system is started. * * This method will automatically detects the configured database using the settings from `configKey` config. * If configured with `use-shared-db`, it will use the `akka-persistence-jdbc.shared-databases` definition instead. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. * * @param configKey the database journal configuration key to use. */ @@ -59,14 +59,14 @@ object SchemaUtils { * Creates the schema for both the journal and the snapshot table using the default schema definition. * * For information about the different schemas and supported databases consult - * https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#database-schema + * https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#database-schema * * This utility method is intended to be used for testing only. * For production, it's recommended to create run DDL statements before the system is started. * * This method will automatically detects the configured database using the settings from `jdbc-journal` config. * If configured with `use-shared-db`, it will use the `akka-persistence-jdbc.shared-databases` definition instead. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. */ @ApiMayChange def createIfNotExists(actorSystem: ClassicActorSystemProvider): CompletionStage[Done] = @@ -76,14 +76,14 @@ object SchemaUtils { * Creates the schema for both the journal and the snapshot table using the default schema definition. * * For information about the different schemas and supported databases consult - * https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#database-schema + * https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#database-schema * * This utility method is intended to be used for testing only. * For production, it's recommended to create run DDL statements before the system is started. * * This method will automatically detects the configured database using the settings from `configKey` config. * If configured with `use-shared-db`, it will use the `akka-persistence-jdbc.shared-databases` definition instead. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. * * @param configKey the database journal configuration key to use. */ @@ -98,7 +98,7 @@ object SchemaUtils { * For production, it's recommended to run any DDL statements before the system is started. * * It will use the database settings found under `jdbc-journal`, or `akka-persistence-jdbc.shared-databases` if configured so. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. * * @param script the DDL script. The passed script can contain more then one SQL statements separated by a ; (semi-colon). */ @@ -113,7 +113,7 @@ object SchemaUtils { * For production, it's recommended to run any DDL statements before the system is started. * * It will use the database settings found under `configKey`, or `akka-persistence-jdbc.shared-databases` if configured so. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. * * @param script the DDL script. The passed `script` can contain more then one SQL statements. * @param separator used to separate the different DDL statements. diff --git a/core/src/main/scala/akka/persistence/jdbc/testkit/scaladsl/SchemaUtils.scala b/core/src/main/scala/akka/persistence/jdbc/testkit/scaladsl/SchemaUtils.scala index d2b947f76..bcf5a5e95 100644 --- a/core/src/main/scala/akka/persistence/jdbc/testkit/scaladsl/SchemaUtils.scala +++ b/core/src/main/scala/akka/persistence/jdbc/testkit/scaladsl/SchemaUtils.scala @@ -21,14 +21,14 @@ object SchemaUtils { * Drops the schema for both the journal and the snapshot table using the default schema definition. * * For information about the different schemas and supported databases consult - * https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#database-schema + * https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#database-schema * * This utility method is intended to be used for testing only. * For production, it's recommended to run any DDL statements before the system is started. * * This method will automatically detects the configured database using the settings from `jdbc-journal` config. * If configured with `use-shared-db`, it will use the `akka-persistence-jdbc.shared-databases` definition instead. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. */ @ApiMayChange def dropIfExists()(implicit actorSystem: ClassicActorSystemProvider): Future[Done] = @@ -38,14 +38,14 @@ object SchemaUtils { * Drops the schema for both the journal and the snapshot table using the default schema definition. * * For information about the different schemas and supported databases consult - * https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#database-schema + * https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#database-schema * * This utility method is intended to be used for testing only. * For production, it's recommended to run any DDL statements before the system is started. * * This method will automatically detects the configured database using the settings from `configKey` config. * If configured with `use-shared-db`, it will use the `akka-persistence-jdbc.shared-databases` definition instead. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. * * @param configKey the database journal configuration key to use. */ @@ -57,14 +57,14 @@ object SchemaUtils { * Creates the schema for both the journal and the snapshot table using the default schema definition. * * For information about the different schemas and supported databases consult - * https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#database-schema + * https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#database-schema * * This utility method is intended to be used for testing only. * For production, it's recommended to run any DDL statements before the system is started. * * This method will automatically detects the configured database using the settings from `jdbc-journal` config. * If configured with `use-shared-db`, it will use the `akka-persistence-jdbc.shared-databases` definition instead. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. */ @ApiMayChange def createIfNotExists()(implicit actorSystem: ClassicActorSystemProvider): Future[Done] = @@ -74,14 +74,14 @@ object SchemaUtils { * Creates the schema for both the journal and the snapshot table using the default schema definition. * * For information about the different schemas and supported databases consult - * https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#database-schema + * https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#database-schema * * This utility method is intended to be used for testing only. * For production, it's recommended to run any DDL statements before the system is started. * * This method will automatically detects the configured database using the settings from `configKey` config. * If configured with `use-shared-db`, it will use the `akka-persistence-jdbc.shared-databases` definition instead. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. * * @param configKey the database journal configuration key to use. */ @@ -96,7 +96,7 @@ object SchemaUtils { * For production, it's recommended to run any DDL statements before the system is started. * * It will use the database settings found under `jdbc-journal`, or `akka-persistence-jdbc.shared-databases` if configured so. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. * * @param script the DDL script. The passed script can contain more then one SQL statements separated by a ; (semi-colon). */ @@ -111,7 +111,7 @@ object SchemaUtils { * For production, it's recommended to create the table with DDL statements before the system is started. * * It will use the database settings found under `configKey`, or `akka-persistence-jdbc.shared-databases` if configured so. - * See https://doc.akka.io/docs/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. + * See https://doc.akka.io/libraries/akka-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details. * * @param script the DDL script. The passed `script` can contain more then one SQL statements. * @param separator used to separate the different DDL statements. diff --git a/docs/release-train-issue-template.md b/docs/release-train-issue-template.md index 34f9fa40b..0983f308f 100644 --- a/docs/release-train-issue-template.md +++ b/docs/release-train-issue-template.md @@ -29,7 +29,7 @@ Key links: ### Check availability - [ ] Check [API](https://doc.akka.io/api/akka-persistence-jdbc/$VERSION$/) documentation -- [ ] Check [reference](https://doc.akka.io/docs/akka-persistence-jdbc/$VERSION$/) documentation. Check that the reference docs were deployed and show a version warning (see section below on how to fix the version warning). +- [ ] Check [reference](https://doc.akka.io/libraries/akka-persistence-jdbc/$VERSION$/) documentation. Check that the reference docs were deployed and show a version warning (see section below on how to fix the version warning). - [ ] Check the release on https://repo.akka.io/maven/com/lightbend/akka/akka-persistence-jdbc_2.13/$VERSION$/akka-persistence-jdbc_2.13-$VERSION$.pom ### When everything is on https://repo.akka.io/maven @@ -39,7 +39,7 @@ Key links: ``` cd ~/www git status - git add docs/akka-persistence-jdbc/current docs/akka-persistence-jdbc/$VERSION$ + git add libraries/akka-persistence-jdbc/current libraries/akka-persistence-jdbc/$VERSION$ git add api/akka-persistence-jdbc/current api/akka-persistence-jdbc/$VERSION$ git commit -m "Akka Persistence JDBC $VERSION$" ``` @@ -59,6 +59,6 @@ For minor or major releases: ### Afterwards -- [ ] Update [akka-dependencies bom](https://github.com/lightbend/akka-dependencies) and version for [Akka module versions](https://doc.akka.io/docs/akka-dependencies/current/) in [akka-dependencies repo](https://github.com/akka/akka-dependencies) +- [ ] Update [akka-dependencies bom](https://github.com/lightbend/akka-dependencies) and version for [Akka module versions](https://doc.akka.io/libraries/akka-dependencies/current/) in [akka-dependencies repo](https://github.com/akka/akka-dependencies) - [ ] Update [Akka Guide samples](https://github.com/akka/akka-platform-guide) - Close this issue diff --git a/docs/src/main/paradox/snapshots.md b/docs/src/main/paradox/snapshots.md index c10102c2f..58903d907 100644 --- a/docs/src/main/paradox/snapshots.md +++ b/docs/src/main/paradox/snapshots.md @@ -41,5 +41,5 @@ Gradle ## Documentation -The [snapshot documentation](https://doc.akka.io/docs/akka-persistence-jdbc/snapshot) is updated with every snapshot build. +The [snapshot documentation](https://doc.akka.io/libraries/akka-persistence-jdbc/snapshot) is updated with every snapshot build. diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 50a13b3e3..942d2a4cf 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,7 +8,7 @@ object Dependencies { val ScalaVersions = Seq(Scala213, Scala3) val AkkaVersion = "2.10.0-M1" - val AkkaBinaryVersion = AkkaVersion.take(3) + val AkkaBinaryVersion = VersionNumber(AkkaVersion).numbers match { case Seq(major, minor, _*) => s"$major.$minor" } val SlickVersion = "3.5.1" val ScalaTestVersion = "3.2.19" diff --git a/project/ProjectAutoPlugin.scala b/project/ProjectAutoPlugin.scala index df4ecd996..b5f7e9617 100644 --- a/project/ProjectAutoPlugin.scala +++ b/project/ProjectAutoPlugin.scala @@ -16,7 +16,7 @@ object ProjectAutoPlugin extends AutoPlugin { organization := "com.lightbend.akka", organizationName := "Lightbend Inc.", organizationHomepage := Some(url("https://www.lightbend.com/")), - homepage := Some(url("https://doc.akka.io/docs/akka-persistence-jdbc/current/")), + homepage := Some(url("https://doc.akka.io/libraries/akka-persistence-jdbc/current/")), scmInfo := Some( ScmInfo(url("https://github.com/akka/akka-persistence-jdbc"), "git@github.com:akka/akka-persistence-jdbc.git")), developers += Developer( diff --git a/scripts/link-validator.conf b/scripts/link-validator.conf index 0a1c2477e..891e88bcf 100644 --- a/scripts/link-validator.conf +++ b/scripts/link-validator.conf @@ -2,13 +2,13 @@ site-link-validator { root-dir = "./docs/target/site/" # relative to `root-dir` - start-file = "docs/akka-persistence-jdbc/snapshot/index.html" + start-file = "libraries/akka-persistence-jdbc/snapshot/index.html" # Resolves URLs with the given prefix as local files instead link-mappings = [ { - prefix = "https://doc.akka.io/docs/akka-persistence-jdbc/snapshot/" - replace = "/docs/akka-persistence-jdbc/snapshot/" + prefix = "https://doc.akka.io/libraries/akka-persistence-jdbc/snapshot/" + replace = "/libraries/akka-persistence-jdbc/snapshot/" } { prefix = "https://doc.akka.io/api/akka-persistence-jdbc/snapshot/"