Skip to content

Building Locally

James Maes edited this page Aug 27, 2025 · 4 revisions

Building Locally

QQQ has a unique build system designed around metadata-driven development. This guide covers the QQQ-specific build process for framework developers working on QQQ itself.

QQQ Build Prerequisites

Java 17+ Required

QQQ uses Java 17 features and won't build with older versions:

java -version  # Must show Java 17+

Maven 3.8+

QQQ uses advanced Maven plugins that require recent versions:

mvn -version  # Must show Maven 3.8+

Git (Required)

QQQ's build system integrates with Git for version management and branch detection.

QQQ Build System Overview

Version Management

QQQ uses a custom versioning approach:

<properties>
    <revision>0.27.0-SNAPSHOT</revision>
</properties>

Key Points:

  • Uses revision property instead of standard version
  • Version is managed by versions-maven-plugin in CI
  • GitFlow integration automatically handles version bumps
  • No manual version management needed

Build Profiles

QQQ has three distinct build modes:

Default Profile - Core Framework Only

mvn clean install

What it builds:

  • qqq-backend-core - Framework foundation
  • All backend modules (RDBMS, filesystem, MongoDB, SQLite)
  • All middleware modules (Javalin, PicoCLI, Lambda, Slack)
  • Frontend dashboard framework

Sample Profile - Include Sample Project

mvn clean install -P withSample

Additional components:

  • qqq-sample-project - For testing QQQ functionality
  • Database setup scripts for integration testing
  • Working examples to verify QQQ features

Release Profile - Maven Central Publishing

mvn clean install -P release

Features:

  • GPG signing for artifacts
  • Source and Javadoc attachment
  • Maven Central deployment preparation

QQQ Build System Features

Strict Code Quality

QQQ enforces high standards:

<coverage.haltOnFailure>true</coverage.haltOnFailure>
<coverage.instructionCoveredRatioMinimum>0.80</coverage.instructionCoveredRatioMinimum>
<coverage.classCoveredRatioMinimum>0.95</coverage.classCoveredRatioMinimum>

Coverage Requirements:

  • Instructions: 80% minimum
  • Classes: 95% minimum
  • Build fails if coverage drops below thresholds

Custom Checkstyle Rules

QQQ uses Kingsrook-specific code style:

<configLocation>checkstyle/config.xml</configLocation>
<headerLocation>checkstyle/license.txt</headerLocation>

Enforced standards:

  • Kingsrook copyright headers
  • Consistent code formatting
  • Naming conventions
  • Documentation requirements

Test Output Management

QQQ redirects test output by default:

<redirectTestOutputToFile>${testOutputToFile}</redirectTestOutputToFile>

Default behavior:

  • Test output goes to files under target/surefire-reports/
  • Console output suppressed for clean builds
  • Override with -DtestOutputToFile=false

QQQ Development Workflow

Core Development

# Build core framework only
mvn clean install -pl qqq-backend-core

# Run tests with coverage
mvn test jacoco:report

# Check code style
mvn checkstyle:check

Module Development

# Build specific module
mvn clean install -pl qqq-backend-module-rdbms

# Build module and dependencies
mvn clean install -pl qqq-backend-module-rdbms -am

# Run integration tests
mvn test -pl qqq-sample-project

Frontend Development

# Navigate to frontend
cd qqq-frontend-material-dashboard

# Install dependencies
npm install

# Start development server
npm start

# Build for production
npm run build

QQQ Build Commands

Quality Checks

# Check code style
mvn checkstyle:check

# Run tests with coverage
mvn test jacoco:report

# Verify coverage thresholds
mvn verify

Full Build

# Complete build with all modules
mvn clean install

# Build with sample project
mvn clean install -P withSample

# Build for release
mvn clean install -P release

Module-Specific Builds

# Build single module
mvn clean install -pl qqq-backend-core

# Build module and dependencies
mvn clean install -pl qqq-backend-module-rdbms -am

# Build module tree
mvn clean install -pl qqq-backend-core -amd

Troubleshooting

Common Build Issues

# Java version mismatch
java -version  # Must be 17+

# Maven version too old
mvn -version   # Must be 3.8+

# Coverage failure
mvn jacoco:report  # Check coverage report

# Checkstyle failure
mvn checkstyle:check  # Review style violations

Performance Optimization

# Skip tests for faster build
mvn clean install -DskipTests

# Parallel build
mvn clean install -T 1C

# Offline mode (if dependencies cached)
mvn clean install -o

For module details, see Core Modules. For development setup, see Developer Onboarding. For testing requirements, see Testing.

Clone this wiki locally