Skip to content

A simple guide for running some Spring repositories on Windows.

Notifications You must be signed in to change notification settings

ngocnhan-tran1996/how-to-run-spring-repos-on-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

How to Run Spring Docs on Windows

Spring Security

  1. Open the file spring-security\docs\antora.yml and replace every command that starts with command: gradlew …​ with command: <Your Disk>:\<Your Folder>\spring-security\gradlew …​

    Example:

    ext:
      collector:
        run:
          command: D:\Source\fork\spring-security\gradlew -q -PbuildSrc.skipTests=true :spring-security-docs:generateAntoraResources
  2. Delete the docs-src directory located at spring-security\docs\modules\ROOT\examples\docs-src

  3. Run Command Prompt as Administrator, then execute the following command:

    mklink /D "<Your Disk>:\<Your Folder>\spring-security\docs\modules\ROOT\examples\docs-src" "<Your Disk>:\<Your Folder>\spring-security\docs\src"

    Example:

    mklink /D "D:\Source\fork\spring-security\docs\modules\ROOT\examples\docs-src" "D:\Source\fork\spring-security\docs\src"
  4. Run the following command to build the documentation: ./gradlew :spring-security-docs:antora

Spring AMQP

  1. Open the file spring-amqp\src\reference\antora\antora.yml and replace every command that starts with command: gradlew …​ with command: <Your Disk>:\<Your Folder>\spring-amqp\gradlew …​

    Example:

    ext:
      collector:
        run:
          command: D:\Source\fork\spring-amqp\gradlew -q :generateAntoraResources
  2. Run the following command to build the documentation: ./gradlew antora

Spring Data Commons

  1. Open the file spring-data-commons\src\main\antora\antora.yml and replace every command that starts with command: ./mvnw …​ with command: <Your Disk>:\<Your Folder>\spring-data-commons\mvnw …​

    Example:

    ext:
      collector:
        - run:
            command: D:\Source\fork\spring-data-commons\mvnw validate process-resources -am -Pantora-process-resources
            local: true
          scan:
            dir: target/classes/antora-resources/
        - run:
            command: D:\Source\fork\spring-data-commons\mvnw package -Pdistribute
            local: true
          scan:
            dir: target/antora
  2. Run the following command to build the documentation: ./mvnw clean install -Pantora

Spring Data Relational

Prerequisite: Clone the repository

  • https://github.com/spring-projects/spring-data-commons

  • https://github.com/spring-projects/spring-data-relational

    1. Open the file spring-data-relational\src\main\antora\antora.yml and replace every command that starts with command: ./mvnw …​ with command: <Your Disk>:\<Your Folder>\spring-data-relational\mvnw …​

      Example:

      ext:
        collector:
          - run:
              command: D:\Source\fork\spring-data-relational\mvnw validate process-resources -pl :spring-data-jdbc-distribution -am -Pantora-process-resources
              local: true
            scan:
              dir: spring-data-jdbc-distribution/target/classes/
          - run:
              command: D:\Source\fork\spring-data-relational\mvnw package -Pdistribute
              local: true
            scan:
              dir: target/antora
    2. Open the file spring-data-relational\src\main\antora\antora-playbook.yml and make the following changes:

      Example:

      content:
        sources:
          - url: ./../../..
            branches: HEAD
            start_path: src/main/antora
            worktrees: true
          - url: D:\Source\fork\spring-data-commons # Change https://github.com/spring-projects/spring-data-commons to <Your Disk>:\<Your Folder>\spring-data-relational
            branches: HEAD # Change to HEAD
            start_path: src/main/antora
    3. Delete the r2dbc directory located at spring-data-relational\src\main\antora\modules\ROOT\examples\r2dbc

    4. Run Command Prompt as Administrator, then execute the following command:

      mklink /D "<Your Disk>:\<Your Folder>\spring-data-relational\src\main\antora\modules\ROOT\examples\r2dbc" "<Your Disk>:\<Your Folder>\spring-data-relational\spring-data-r2dbc\src\test\java\org\springframework\data\r2dbc\documentation"

      Example:

      mklink /D "D:\Source\fork\spring-data-relational\src\main\antora\modules\ROOT\examples\r2dbc" "D:\Source\fork\spring-data-relational\spring-data-r2dbc\src\test\java\org\springframework\data\r2dbc\documentation"
    5. Run the following command to build the documentation: ./mvnw clean install -Pantora

Spring Framework

  1. Open the file spring-framework\framework-docs\antora.yml and replace every command that starts with command: gradlew …​ with command: <Your Disk>:\<Your Folder>\spring-framework\gradlew …​

    Example:

    ext:
      collector:
        run:
          command: D:\Source\fork\spring-framework\gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g" :framework-docs:generateAntoraResources
          local: true
        scan:
          dir: ./build/generated-antora-resources
  2. Open the file spring-framework\framework-docs\antora-playbook.yml and make the following changes:

    Example:

    content:
      sources:
      - url: ../ # https://github.com/spring-projects/spring-framework
        branches: HEAD # ['main', '{6..9}.+({1..9}).x']
        # tags: ['v{6..9}.+({0..9}).+({0..9})?(-{RC,M}*)', '!(v6.0.{0..8})', '!(v6.0.0-{RC,M}{0..9})']
        start_path: framework-docs
  3. Delete the docs-src directory located at spring-framework\framework-docs\modules\ROOT\examples\docs-src

  4. Run Command Prompt as Administrator, then execute the following command:

    mklink /D "<Your Disk>:\<Your Folder>\spring-framework\framework-docs\modules\ROOT\examples\docs-src" "<Your Disk>:\<Your Folder>\spring-framework\framework-docs\src"

    Example:

    mklink /D "D:\Source\fork\spring-framework\framework-docs\modules\ROOT\examples\docs-src" "D:\Source\fork\spring-framework\framework-docs\src"
  5. Run the following command to build the documentation: ./gradlew :framework-docs:antora

Spring Kafka

  1. Open the file spring-kafka\spring-kafka-docs\src\main\antora\antora.yml and replace every command that starts with command: gradlew …​ with command: <Your Disk>:\<Your Folder>\spring-kafka\gradlew …​

    Example:

    ext:
      collector:
        run:
          # FIXME Change "command" to the command that generates your antora.yml and other antora resources
          # See https://gitlab.com/antora/antora-collector-extension/-/blob/main/docs/modules/ROOT/pages/configuration-keys.adoc?ref_type=heads#collector-reference
          # HINT: Maven is typically something like:
          # ./mvnw validate process-resources -am -Pantora-process-resources
          command: D:\Source\fork\spring-kafka\gradlew :spring-kafka-docs:generateAntoraResources
          local: true
  2. Delete the java-examples and kotlin-examples directories located at spring-kafka\spring-kafka-docs\src\main\antora\modules\ROOT\examples.

  3. Run Command Prompt as Administrator, then execute the following command:

    mklink /D "<Your Disk>:\<Your Folder>\spring-kafka\spring-kafka-docs\src\main\antora\modules\ROOT\examples\java-examples" "<Your Disk>:\<Your Folder>\spring-kafka\spring-kafka-docs\src\main\java"
    mklink /D "<Your Disk>:\<Your Folder>\spring-kafka\spring-kafka-docs\src\main\antora\modules\ROOT\examples\kotlin-examples" "<Your Disk>:\<Your Folder>\spring-kafka\spring-kafka-docs\src\main\kotlin"

    Example:

    mklink /D "D:\Source\fork\spring-kafka\spring-kafka-docs\src\main\antora\modules\ROOT\examples\java-examples" "D:\Source\fork\spring-kafka\spring-kafka-docs\src\main\java"
    mklink /D "D:\Source\fork\spring-kafka\spring-kafka-docs\src\main\antora\modules\ROOT\examples\kotlin-examples" "D:\Source\fork\spring-kafka\spring-kafka-docs\src\main\kotlin"
  4. Run the following command to build the documentation: ./gradlew antora

Spring AI

  1. Open the file spring-ai\spring-ai-docs\src\main\antora\antora.yml and replace every command that starts with command: ./mvnw …​ with command: <Your Disk>:\<Your Folder>\spring-ai\mvnw …​

    Example:

    ext:
      collector:
        - run:
            command: D:\Source\fork\spring-ai\mvnw process-resources
            local: true
          scan:
            dir: spring-ai-docs/target/classes/antora-resources
  2. Run the following command to build the documentation: ./mvnw -pl spring-ai-docs antora

Micrometer

  1. Open the file micrometer\docs\antora.yml and replace every command that starts with command: gradlew …​ with command: <Your Disk>:\<Your Folder>\micrometer\gradlew …​

    Example:

    ext:
      collector:
        run:
          command: D:\Source\fork\micrometer\gradlew -q -PbuildSrc.skipTests=true -Pantora :docs:generateAntoraResources
          local: true
        scan:
          dir: ./build/generated-antora-resources
  2. Delete the core-test, docs-src, micrometer-java11-test and micrometer-test directories located at micrometer\docs\modules\ROOT\examples.

  3. Run Command Prompt as Administrator, then execute the following command:

    mklink /D "<Your Disk>:\<Your Folder>\micrometer\docs\modules\ROOT\examples\core-test" "<Your Disk>:\<Your Folder>\micrometer\micrometer-core\src\test\java"
    mklink /D "<Your Disk>:\<Your Folder>\micrometer\docs\modules\ROOT\examples\docs-src" "<Your Disk>:\<Your Folder>\micrometer\docs\src"
    mklink /D "<Your Disk>:\<Your Folder>\micrometer\docs\modules\ROOT\examples\micrometer-java11-test" "<Your Disk>:\<Your Folder>\micrometer\micrometer-java11\src\test\java"
    mklink /D "<Your Disk>:\<Your Folder>\micrometer\docs\modules\ROOT\examples\micrometer-test" "<Your Disk>:\<Your Folder>\micrometer\micrometer-test\src\test\java"

    Example:

    mklink /D "D:\Source\fork\micrometer\docs\modules\ROOT\examples\core-test" "D:\Source\fork\micrometer\micrometer-core\src\test\java"
    mklink /D "D:\Source\fork\micrometer\docs\modules\ROOT\examples\docs-src" "D:\Source\fork\micrometer\docs\src"
    mklink /D "D:\Source\fork\micrometer\docs\modules\ROOT\examples\micrometer-java11-test" "D:\Source\fork\micrometer\micrometer-java11\src\test\java"
    mklink /D "D:\Source\fork\micrometer\docs\modules\ROOT\examples\micrometer-test" "D:\Source\fork\micrometer\micrometer-test\src\test\java"
  4. Run the following command to build the documentation: ./gradlew antora

About

A simple guide for running some Spring repositories on Windows.

Resources

Stars

Watchers

Forks