Skip to main content

Development

Athena is developed in Jersey framework.

NOTE: In case you are not familiar with Jersey, it is a parallel technology with "Spring Boot framework". Athena offers absolutely NO support for Spring and will remain as an exclusive Jersey application in the future, because Jersey, alone with its backing technology HK2, is the reference-implementation of JSR-370 (and HK2, JSR-330) standards while Spring is not.

By "having no support for Spring", Athena means the following:

  1. Athena DOES NOT, AND WILL NOT, run as a Spring Boot Webservice
  2. Athena has ABSOLUTE ZERO direct-dependency from Spring
  3. Athena runs in NON-SPRING containers, such as Jetty

Athena rejects any conducts that violate the 3 rules above. NO EXCEPTION.

Overview

The following guide is intended to help developers who maintain or want to make changes to the Athena framework.

Building

Athena is built using Maven. Because Athena is a mono-repo with interdependencies between modules, it is recommended to fully build and install the project at least once:

mvn clean install

Thereafter, individual modules can be built whenever making changes to them. For example, the following command would rebuild only athena-core:

mvn clean install -f athena-core

Pull requests and release builds leverage GitHub Action. PR builds simply run the complete build along with code coverage.

Running Webservice in Standalone Jetty

Download Jetty

For JDK 17, which is the version JWT runs on, it's been tested that Jetty 11.0.15 worked. Hence, we will use "11.0.15" release as an example:

Error loading download-jetty.png

Put the tar.gz file into a location of your choice as the installation path and extract the Jetty binary using

tar -xzvf jetty-home-11.0.15.tar.gz

The extracted directory jetty-home-11.0.15 is the Jetty distribution. We call this directory $JETTY_HOME, which should not be modified.

Setting Up Standalone Jetty

Our WAR file will be dropped to a directory where Jetty can pick up and run. We call this directory $JETTY_BASE, which is usually different from the $JETTY_HOME. The $JETTY_BASE also contains container runtime configs. In short, the Standalone Jetty container will be setup with

export JETTY_HOME=/path/to/jetty-home-11.0.15
mkdir -p /path/to/jetty-base
cd /path/to/jetty-base
java -jar $JETTY_HOME/start.jar --add-module=annotations,server,http,deploy,servlet,webapp,resources,jsp

where /path/to/ is the absolute path to the directory containing the jetty-home-11.0.15 directory

The --add-module=annotations,server,http,deploy,servlet,webapp,resources,jsp is how we configure the Jetty container.

Lastly, drop the WAR file into /path/to/jetty-base/webapps directory and rename the WAR file to ROOT.war:

mv /path/to/war-file /path/to/jetty-base/webapps/ROOT.war

Running Webservice

java -jar $JETTY_HOME/start.jar

The webservice will run on port 8080, and you will see the data you inserted

Release Versions

Athena follows semantic versioning for its releases. Minor and patch versions only have the version components of MAJOR.MINOR.PATCH.

Major releases are often pre-released prior to the publication of the final version. Pre-releases have the format of MAJOR.MINOR.PATCH-prCANDIDATE. For example, 5.0.0-pr2 is release candidate 2 of the Athena 5.0.0 version.