Skip to main content

Template Features

Everything you need for modern Java 25 development with best practices built-in

Core Feature

Java 25 Ready

This template is built specifically for Java 25, taking advantage of the latest language features and improvements.

Compiler Configuration

<maven.compiler.release>25</maven.compiler.release>

Uses the latest Java 25 compiler release setting for optimal compatibility and feature access.

CI/CD Integration

- name: "Setup JDK"
  uses: actions/setup-java@v5
  with:
    distribution: "oracle"
    java-version: 25

GitHub Actions workflow configured with Oracle JDK 25 for consistent builds and deployments.

Testing Excellence

Comprehensive testing setup with separation of concerns and modern testing libraries.

๐Ÿงช

Separated Test Execution

Surefire Plugin for unit tests (*Test.java) and Failsafe Plugin for integration tests (*IT.java) with different execution phases.

โšก

Parallel Test Execution

JUnit Platform configured for parallel test execution with dynamic strategy for faster feedback loops.

๐ŸŽฏ

Property-Based Testing

jqwik 1.9.3 for property-based testing to discover edge cases automatically with generated test data.

๐Ÿ“

Architecture Testing

ArchUnit 1.4.1 for testing architectural rules and ensuring code structure compliance.

๐Ÿ—๏ธ

Fluent Assertions

AssertJ 3.27.6 for readable and maintainable test assertions with fluent API.

๐ŸŽฒ

Test Data Generation

Instancio 5.5.1 for generating test data objects automatically with customizable constraints.

Parallel Test Configuration

junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.config.strategy = dynamic
junit.jupiter.execution.parallel.mode.default = concurrent
junit.jupiter.execution.parallel.mode.classes.default = concurrent

Code Quality & Formatting

Automated code quality enforcement with industry-standard formatting and best practices.

Spotless Code Formatting

Google Java Format with AOSP style automatically applied during compilation phase.

./mvnw spotless:apply  # Format code
./mvnw spotless:check  # Verify formatting

Automated Quality Gates

Spotless formatting checks run automatically during the compile phase to ensure consistent code style.

<execution>
    <goals><goal>check</goal></goals>
    <phase>compile</phase>
</execution>

Maven Configuration & Best Practices

Optimized Maven configuration with wrapper for consistent builds across environments.

๐Ÿ“ฆ

Maven Wrapper

No need to install Maven locally. The wrapper ensures consistent Maven version across all environments.

โš™๏ธ

JVM Configuration

Optimized JVM settings in .mvn/jvm.config for better performance and headless operation.

๐Ÿ”ง

Maven Optimizations

Batch mode, fail-at-end, and no transfer progress for cleaner CI/CD output.

Configuration Files

.mvn/jvm.config

-Xmx2048m -Xms512m -Djava.awt.headless=true

Optimized heap settings and headless mode for CI environments.

.mvn/maven.config

-B
--fail-at-end
--no-transfer-progress

Batch mode and optimization flags for better CI/CD experience.

Development Tools

Modern development tools and integrations for enhanced productivity.

๐Ÿš

JShell Integration

REPL development support with JShell Maven plugin for interactive Java development and experimentation.

./mvnw jshell:run
๐Ÿ“ฆ

Modularization Ready

Java Platform Module System (JPMS) configured with module-info.java files for both main and test sources.

๐Ÿ”„

jenv Configuration

Java version management with jenv for easy switching between different Java versions in development.

๐Ÿ“ฆ

Fat JAR Support

Maven Shade plugin available via profile for creating executable JAR files with all dependencies.

./mvnw package -Pshade

CI/CD & Automation

GitHub Actions workflow ready for continuous integration and deployment.

GitHub Actions Workflow

name: Maven Build
on:
  push:
    branches: [main]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: "Setup JDK"
        uses: actions/setup-java@v5
        with:
          distribution: "oracle"
          java-version: 25
          cache: "maven"
      - name: "Build with Maven"
        run: ./mvnw verify

Complete CI/CD pipeline with Oracle JDK 25, Maven caching, and full verification including tests and quality checks.

Ready to Use All These Features?

Start your Java 25 project with all these best practices and tools pre-configured.

Support This Project

If you find this template useful, consider supporting its development!

Buy Me A Coffee