Skip to content

Latest commit

 

History

History
222 lines (178 loc) · 5.75 KB

File metadata and controls

222 lines (178 loc) · 5.75 KB

Installing required tools in order to build locally

Before you go very far, you will need tools to develop things.

These are the versions of software tools which are known to work:

  • Python v3.11.0
  • Gradle 8.9
  • Apache Maven 3.9.0
  • openjdk 17.0.12
  • go 1.23.5
  • sdkman script: 5.18.2 native: 0.4.6

Python

Install pyenv

Use pyenv so you can install multiple versions of python and switch between them easily.

Summary for Mac:

brew update
brew install pyenv

Add this to your ~/.zprofile file:

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/shims:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi

Useful commands:

  • pyenv install --list - lists the versions of python which are available
  • pyenv install 3.11.0 - installs python version 3.10.4

Install python 3.9 or above

pyenv install 3.11.0
pyenv global 3.11.0

Before using pip to install Python modules, make sure it is at the most current version.

pip install --upgrade pip

SDKman

SDKman is a platform-independent tool which installs other tools.

Install SDKman:

curl -s "https://get.sdkman.io" | bash   

Execute this on the current command-line session:

source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk version

Java

Install Java using SDKman

List the available java releases

sdk list java

Install the semeru java 17 release:

sdk install java 17.0.12-sem

Add this to your ~.zprofile :

source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk version
export SDKMAN_JAVA_VERSION="17.0.12-sem"
sdk default java ${SDKMAN_JAVA_VERSION}
sdk use java ${SDKMAN_JAVA_VERSION}

Gradle

List the available gradle versions

sdk list gradle

Install one known to work

sdk install gradle 8.9

Set this version as the default

sdk default gradle 8.9

You need to put gradle on your path. Add this to your ~/.zprofile:

export PATH="/opt/homebrew/opt/gradle@6/bin:$PATH"
gradle --version | grep "Gradle" | cut -f2 -d' '

You also need to make sure that gradle tells the JVM where it should find certificate authorities it can trust.

We recommend that you change your java SSL trust store password. Reflect that in an environment variable.

export JAVA_SSL_TRUST_STORE_PASSWORD="changeit"
cat << EOF > ~/.gradle/gradle.properties
# This file is created by ~/.zprofile whenever it runs.
org.gradle.java.home=${JAVA_HOME}
systemProp.javax.net.ssl.trustStore=${JAVA_HOME}/lib/security/cacerts
systemProp.javax.net.ssl.trustStorePassword=${JAVA_SSL_TRUST_STORE_PASSWORD}
EOF

Put the above code in my .zprofile so that even if I change/upgrade JDKs, it should still work.

Maven

List the available versions of maven

sdk list maven

Install a version of maven which is known to work

sdk install maven 3.9.0

Add this to your ~/.m2/settings.xml file:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
          
  <pluginGroups>
    <pluginGroup>dev.galasa</pluginGroup>
  </pluginGroups>

    <profiles>
        <profile>
            <id>galasa</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>maven.central</id>
                    <url>https://repo.maven.apache.org/maven2/</url>
                </repository>
                <!-- To use the bleeding edge version of galasa, use the development obr -->
                <repository>
                    <id>galasa.repo</id>
                    <url>https://development.galasa.dev/main/maven-repo/obr</url> 
                    <releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
                </repository> 
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>maven.central</id>
                    <url>https://repo.maven.apache.org/maven2/</url>
                </pluginRepository>
                <!-- To use the bleeding edge version of galasa, use the development obr -->
                <pluginRepository>
                    <id>galasa.repo</id>    
                    <url>https://development.galasa.dev/main/maven-repo/obr</url>
                    <releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
                </pluginRepository> 
             </pluginRepositories>
         </profile>
     </profiles>

</settings>

That tells maven where it can find some custom maven plugin tools used by the build.

Go

v1.23.5 or higher from go.dev.

mkdocs

mkdocs is a tool for rendering .md files into html pages. We use it to generate this developer-docs site from the repository on github enterprise

As it says in the mkdocs documentation, install the tool like this:

pip install mkdoc

Extra helpful tools

These tools are not 'needed' but you might find them helpful at some point:

  • wget - This is useful if you want to download a file from a URL
  • tree - Gives a pretty-print of folders and the files within them
  • draw.io - A drawing tool which can render to png/jpg