Skip to content

JeffersonLab/jaws-libj

Repository files navigation

jaws-libj CI with Docker and Gradle Maven Central

Reusable Java Classes for JAWS. Entity classes generated to match the JAWS AVRO schemas are included as well as consumer client classes.



Install

This library requires a Java 11+ JVM and standard library at run time.

You can obtain the library jar file from the Maven Central repository directly or from a Maven friendly build tool with the following coordinates (Gradle example shown):

implementation 'org.jlab:jaws-libj:<version>'

Check the Release Notes to see what has changed in each version.

API

Javadocs

Configure

Each client class requires a Java Properties object in the constructor to indicate configuration. The expected properties match those in the kakfa-common lib.

Build

This project is built with Java 17 (compiled to Java 11 bytecode), and uses the Gradle 7 build tool to automatically download dependencies and build the project from source:

git clone https://github.com/JeffersonLab/jaws-libj
cd jaws-libj
gradlew build

Note: If you do not already have Gradle installed, it will be installed automatically by the wrapper script included in the source

Note for JLab On-Site Users: Jefferson Lab has an intercepting proxy

Develop

Set up the build environment following the Build instructions.

In order to iterate rapidly when making changes it's often useful to create new tests and run them directly on the local workstation, perhaps leveraging an IDE. In this scenario run the service dependencies with Docker Compose:

docker compose -f deps.yml up

Test

The integration tests depend on a running Kafka instance, generally in Docker. The tests run automatically via the CI GitHub Action on every commit (unless [no ci] is included in the commit message). The tests can be run locally during development. Set up the development environment following the Develop instructions. Then with the deps.yml Docker containers running execute:

gradlew integrationTest

Release

  1. Bump the version number and release date in build.gradle and commit and push to GitHub (using Semantic Versioning).
  2. Create a new release on the GitHub Releases page corresponding to same version in build.gradle (Enumerate changes and link issues)
  3. Publish to Maven Central GitHub Action should run automatically.
  4. Publish to gh-pages GitHub Action should run automatically.

See Also