valid8j is built and tested using Java 8, which is the most compatible as of April in 2024.

Prerequisites

  • JDK (Java SE 8. No older, no newer. OpenJDK is recommended.)

  • mvn (3.6.x is recommended)

  • dot (Necessary for building the documentation. You can install it as a part of graphviz)

  • ruby (3.0.x is recommended)

  • bash (5.1.x is recommended. I don’t think macOS’s default one works.)

Setting Up a Development Environment

Also, import the directory to your IDE as a project.

Build Process

Build by maven

Building a binary

mvn clean compile This compiles your production code. The compiled classes will be found under the target/classes directory.

Running the test suite

mvn clean compile test This compiles your production and test code. The compiled classes and test report will be found under target directory.

Creating a package

mvn clean compile test package This compiles your production code and executes the unit test suite. Reports will be generated under the target directory.

Creating a site on your local

mvn clean compile test site This will generate the product site’s under target/site directory. This is time-consuming because it generates project reports such as JavaDoc, coverage report, etc.

Generating JavaDoc

mvn clean compile test javadoc:javadoc This is less time-consuming than the "Creating a site on your local" or the Creating a package procedures. The generated documentation is found under target/apidocs directory.

Deploying the site publicly

mvn clean compile test site-deploy To execute this, you need to have a GitHub account with a permission to do so.

Testing

mvn test

Runs tests.

Contribution Guidelines

Coding conventions are defined as IDEA’s configuration and found under .idea directory of the source tree. Note that asciidoc and asciidoclet are used for documentation rather than markdown.

When you open a pull request, don’t forget:

  • Running a test (mvn test)

  • If the tests pass, try mvn site or run "all tests" from your IntelliJ to make sure your changes are exercised by the tests. If not, please write tests.

  • The main branch is main

Index

References