Build from source
Building from source works on any machine with Java 25, including those that no release binary covers. You need a copy of the Witnyx repository, Java 25 or later and Maven 3.9 or later. The build checks both versions and stops when one is older.
Build the JAR
Section titled “Build the JAR”In the repository’s root folder:
mvn -q verifyThis builds both modules, witnyx-core and witnyx-cli, runs their tests, and writes:
witnyx-cli/target/witnyx-cli-0.1.0-SNAPSHOT.jar, the command-line tool in one JAR;target/witnyx-sbom.cdx.json, Witnyx’s own software bill of materials (SBOM) in CycloneDX format. The CycloneDX Maven plugin needs Maven online, so an offline build (mvn -o) does not write it.
To build the JAR without running the tests:
mvn -q package -DskipTestsRun it
Section titled “Run it”java -jar witnyx-cli/target/witnyx-cli-0.1.0-SNAPSHOT.jar versionThe examples on this site call the tool witnyx. To do the same in bash or zsh, define an alias with the absolute path of the JAR:
alias witnyx='java -jar /absolute/path/to/witnyx-cli/target/witnyx-cli-0.1.0-SNAPSHOT.jar'witnyx version then prints the version, the cache folder and the age of each public list in the cache. Before the first check, nothing is cached:
$ witnyx versioncisa-kev: not cachedenisa-euvd: not cachedendoflife-date: not cachedTo check Witnyx’s own SBOM with the tool you built:
witnyx check target/witnyx-sbom.cdx.json --fail-on exploited --no-agentBuild the native binary
Section titled “Build the native binary”The native Maven profile builds a native executable with GraalVM Community for JDK 25. The executable needs no Java to run. Point GRAALVM_HOME or JAVA_HOME at GraalVM, then:
mvn -Pnative -pl witnyx-cli -am package -DskipTestswitnyx-cli/target/witnyx versionOn Windows the executable is witnyx-cli/target/witnyx.exe. On Linux, everything except the GNU C library (glibc) is linked into the executable.
Build the Docker image
Section titled “Build the Docker image”The Dockerfile in the repository’s root folder compiles the native binary from the JAR inside GraalVM’s build image. It then copies the binary onto a minimal runtime image, which has no shell and runs as a user without root rights. It builds for the architecture of your machine only.
mvn -q package -DskipTestsdocker build -t witnyx:dev .docker run --rm witnyx:dev versionThe image’s working folder is /work. Mount your project there to check it:
docker run --rm --volume "$PWD:/work" witnyx:dev check bom.jsonNext steps
Section titled “Next steps”- Run your first check.
- Run the image in CI: Docker shows the options, with
witnyx:devin place of the published image.
Witnyx is a record-keeping and workflow tool. It does not certify compliance. Nothing on this site is legal advice.