Skip to content

Latest commit

 

History

History
125 lines (89 loc) · 3.74 KB

File metadata and controls

125 lines (89 loc) · 3.74 KB

senzing-commons-java

If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.

You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!

Overview

The Senzing Commons Java Library contains Java classes, interfaces and utilities that are common to multiple Senzing projects. It is initially a refactoring of classes from senzing-garage/senzing-api-server.

Dependencies

To build the Senzing Commons Java Library you will need Apache Maven (recommend version 3.8.5 or later) as well as OpenJDK version 17.0.x. All other build dependencies for senzing-commons-java are maintained in the pom.xml file.

The Claude Code PostToolUse hook configured in .claude/settings.json parses tool-input JSON with jq to extract the path of the file being edited. Contributors who use Claude Code against this repository need jq on their PATH; everyone else can ignore it. Install via Homebrew (brew install jq), apt (sudo apt install jq), or the equivalent for your platform. The hook is silent on missing jq (the auto-format step is a no-op), so the build still succeeds without it.

Cloning

This repository uses a git submodule mounted at .java-coding-standards/ that ships the shared formatter profile, checkstyle config, bulk-format scripts, and FAQ MCP server consumed by Maven, the IDE, and Claude Code. The submodule must be initialized before the build will work — a plain git clone is not enough.

Either clone with submodules in one step:

git clone --recurse-submodules https://github.com/senzing-garage/senzing-commons-java.git

Or initialize after a plain clone:

git clone https://github.com/senzing-garage/senzing-commons-java.git
cd senzing-commons-java
git submodule update --init --recursive

After pulling changes that bump the submodule pin, refresh the local checkout with:

git submodule update --init --recursive

CI workflows must check out submodules too — actions/checkout with submodules: recursive (or the equivalent for other CI systems).

If you build without initializing submodules, Maven will fail with an "Unable to find configuration file" error from maven-checkstyle-plugin, the IDE will not pick up the formatter profile, and the FAQ MCP server entry in .mcp.json will fail to start.

Building

This is a Maven project and as such standard Maven commands are used to build it:

  • Packaging the classes and javadocs in separate JAR files

    mvn package
  • Packaging the classes and javadocs and installing in your local Maven repo:

    mvn install
  • Simply compiling without packaging:

    mvn compile
  • Removing artifacts from a previous build:

    mvn clean
  • Packaging and/or installing with removal of previously built artifacts:

    mvn clean package
    mvn clean install
  • Packaging and/or installing without running the unit tests:

    mvn -DskipTests=true package
    mvn -DskipTests=true install

Documentation

Javadocs are provided for all classes. You can generate the Javadocs with the various build commands above. Please see the Javadocs for usage details.