Install the library
Use JDK 17 or a compatible newer JDK. The artifact targets Java 17. The runtime needs Java’s java.desktop module for font/image support, even in headless deployments; retain it in reduced jlink runtimes.
Add the dependency
Section titled “Add the dependency”The version shown below must be installed locally or available in your configured repository before these dependency declarations resolve. A version in this guide does not imply Maven Central availability.
<dependency> <groupId>io.github.nunosilva-dev</groupId> <artifactId>letter-generator</artifactId> <version>1.0.0</version></dependency>dependencies { implementation("io.github.nunosilva-dev:letter-generator:1.0.0")}The ordinary JAR has transitive runtime dependencies. Let your build tool resolve them; copying only the library JAR to a classpath is insufficient. The library uses Apache FOP for layout, PDFBox for supported PDF processing, jsoup for markup, Jackson for JSON and Commons Text for literal binding.
Build from an authorized source checkout
Section titled “Build from an authorized source checkout”From the library root:
./mvnw clean installOn Windows, use mvnw.cmd clean install. The checked-in wrapper downloads Maven 3.9.11, so global Maven installation is optional. The first build needs repository access; subsequent builds can use cached dependencies with -o.
This checks formatting, compiles with warnings treated as errors, runs tests and Checkstyle, generates public Javadocs and installs binary/source/Javadoc artifacts in the local Maven repository. The current build creates actual implementation source artifacts; distribution settings remain a separate maintainer decision.
Use a complete example project
Section titled “Use a complete example project”Download the runnable Maven examples. The ZIP includes complete Java entry points, JSON/HTML inputs, fictional energy-letter artwork and licensed example fonts. Its only application dependency is the library artifact; no test helpers or implementation API are required.
After making the artifact available:
mvn package dependency:copy-dependenciesjava -Djava.awt.headless=true -cp "target/classes:target/dependency/*" FluentQuickstartRun those commands in the extracted project. On Windows, replace the classpath : separator with ;. The program writes letter.pdf; pass an output filename as its first argument to choose another location.
Continue to your first letter for all four input routes.