Appendix: Release Prereqs

This appendix describes the prerequisites for the release process.

Software

Instructions here are for Linux.

  • jdk 21

    sdk install java 21...
    for v2.x branch of Causeway we target Java 11 but we still build with the more recent version of Java.
  • mvn 3.9.7

    sdk install maven 3.9.7
  • groovy 3.x

    sdk install groovy 3.0.21
  • pandoc 2.x

    sudo apt update
    sudo apt install pandoc
  • dos2unix (if building on Windows)

  • Node LTS

    Antora recommend using nvm (Node version manager) to install Node:

    • install nvm

      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
      source ~/.bashrc
    • install LTS version of node:

      nvm install --lts
  • Antora itself

    npm i -g @antora/cli@^3.1.7 @antora/site-generator@^3.1.7 asciidoctor-kroki@0.17.0
    npm i -g serve@^13.0.2

Public/private key

The most important configuration you require is to set up public/private key pair. This is used by the maven-release-plugin to sign the code artifacts. See the page on key generation for more details.

In order to prepare the release, you’ll (need to) have a ~/.gnupg directory with the relevant files (gpg.conf, pubring.gpg, secring.gpg etc), and have gpg on your operating system PATH.

If on Windows, the equivalent directory is c:\users\xxx\appdata\roaming\gnupg. For gpg, use either cygwin.com or gpg4win.org.

Note also that the mSysGit version of gpg.exe (as provided by GitHub’s bash client) is not compatible with that provided by cygwin; move it to one side and check that gpg.exe being used is that from gpg4win.

If you use Atlassian’s SourceTree, this also bundles a version of gpg.exe that is not compatible (in C:\Users\xxx\AppData\Local\Atlassian\SourceTree\git_local\usr\bin); again, move it to one side and instead use the one provided by gpg4win.

Maven settings.xml

During the release process the maven-deploy-plugin uploads the generated artifacts to a staging repo on the Apache repository manager. This requires your Apache LDAP credentials to be specified in your ~/.m2/settings.xml file:

<settings>
  <servers>
    <server>
      <id>apache.releases.https</id>
      <username>xxxxxxx</username>
      <password>yyyyyyy</password>
    </server>
    ...
  </servers>
  ...
</settings>

where xxxxxxx and yyyyyyy are your Apache LDAP username and password. For more information, see these ASF docs.

It is also possible to configure to use .ssh secure keys, and thereby avoid hardcoding your Apache LDAP password into your .m2/settings.xml file. A description of how to do this can be found, for example, here.

Also, set up keyphrase for gpg; this avoids being prompted during release:

<profiles>
  <profile>
    <id>gpg</id>
    <properties>
      <gpg.executable>gpg2</gpg.executable>
      <gpg.passphrase>this is not really my passphrase</gpg.passphrase>
    </properties>
  </profile>
  ...
</profiles>

<activeProfiles>
  <activeProfile>gpg</activeProfile>
  ...
</activeProfiles>

Doc Tooling

See also causewaystuff documentation.

In the apache-causeway-committers/causewaystuff repo:

  • check out main branch

  • install/use Java 21

    For example:

    sdk use java 21...
  • build the tooling

    mvn -D module-tooling install -Dskip.essential

In the regular causeway repo:

  • Create a symlink to the causewaystuff-tooling-cli jar file

    mkdir -p tooling/cli/target
    pushd tooling/cli/target
    ln -s ../../../../../apache-causeway-committers/causewaystuff/tooling/cli/target/causewaystuff-tooling-cli-spring-boot.jar causewaystuff-tooling-cli.jar
    popd
    ADJUST PATH AS NECESSARY