Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 4.27 KB

README.md

File metadata and controls

67 lines (52 loc) · 4.27 KB

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.yaml 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.yaml Docker containers running execute:

gradlew integrationTest

Release

  1. Bump the version number in the VERSION file and commit and push to GitHub (using Semantic Versioning).
  2. The CD GitHub Action should run automatically invoking:
    • The Create release GitHub Action to tag the source and create release notes summarizing any pull requests. Edit the release notes to add any missing details.
    • The Publish artifact GitHub Action to create a deployment artifact on maven central.
    • The Publish docs GitHub Action to create javadocs.

See Also