How to build Acorus from source

Acorus is free, open-source software.

While pre-built artifacts can be downloaded from GitHub and the Maven Central Repository, some people prefer to build them from source.

You can also build a local copy of the documentation (website content). This is useful if you are editing the content, or if your Internet access is limited or unreliable.

Library artifacts

Standard build

Here’s the recommended procedure:

  1. Install a Java Development Kit (JDK), if you don’t already have one.

  2. Point the JAVA_HOME environment variable to your JDK installation: (The path might be something like "C:\Program Files\Java\jre1.8.0_301" or "/usr/lib/jvm/java-8-openjdk-amd64/" or "/Library/Java/JavaVirtualMachines/liberica-jdk-17-full.jdk/Contents/Home" .)

    1. using Bash or Zsh: export JAVA_HOME=" path to installation "

    2. using Fish: set -g JAVA_HOME " path to installation "

    3. using Windows Command Prompt: set JAVA_HOME=" path to installation "

    4. using PowerShell: $env:JAVA_HOME = ' path to installation '

  3. Download and extract the Acorus source code from GitHub:

    1. using Git:

      1. git clone https://github.com/stephengold/Acorus.git

      2. cd Acorus

      3. git checkout -b latest 2.0.0

    2. using a web browser:

      1. browse to https://github.com/stephengold/Acorus/releases/latest

      2. follow the "Source code (zip)" link

      3. save the ZIP file

      4. extract the contents of the saved ZIP file

      5. cd to the extracted directory

  4. Run the Gradle wrapper to build the entire project:

    1. using Bash or Fish or PowerShell or Zsh: ./gradlew build

    2. using Windows Command Prompt: .\gradlew build

After a successful build, artifacts will be found in the "AcorusLibrary/build/libs" directory.

Install artifacts

You can install the built artifacts to your local Maven repository:

  • using Bash or Fish or PowerShell or Zsh: ./gradlew install

  • using Windows Command Prompt: .\gradlew install

Cleanup

After a build, you can restore the project to a pristine state:

  • using Bash or Fish or PowerShell or Zsh: ./gradlew clean

  • using Windows Command Prompt: .\gradlew clean

Website content

  1. Download and extract the source code from GitHub:

  2. Edit "docs/playbook.yml" and replace "/home/sgold/NetBeansProjects/Acorus" with an absolute path to your checkout directory (3 places).

  3. Install Node.js

  4. Run Antora:

    1. npx antora docs/playbook.yml

After a successful build, the local copy of the site will be found in the "build/site" directory.