Architecture testing for Java

ArchUnitJava

The foundation repository tracks a Java implementation that will analyze source and symbols without executing the target application. It aims for honest Maven and Gradle discovery, immutable rules, structured violations, and unambiguous coordinates.

Foundation stageJava ecosystemTo be finalized

Roadmap

Follow the public foundation backlog
ArchitectureTest.java
var rule = ArchUnit.projectFiles()
    .inFolder("src/main/java/**/api/**")
    .shouldNot()
    .dependOnFiles()
    .inFolder("src/main/java/**/infrastructure/**");

ArchAssert.passes(rule);

Capabilities

What ArchUnitJava brings to the test suite.

The family shares a recognizable architecture vocabulary while each implementation stays honest about its language, toolchain, and maturity.

01

Source and symbol analysis by default

02

Maven and Gradle source-root discovery

03

Files, packages, types, and JPMS direction

04

Immutable family-recognizable grammar

05

Structured violations

06

Natural JUnit 5 integration

Current maturity

Foundation stage

A public delivery skeleton and design target, not a released API. The issue backlog is the source of truth.

LanguageJava
ReleasePlanned
RuntimeJava ecosystem
LicenseTo be finalized

Where it fits

Put boundaries next to the code they protect.

Common starting points for ArchUnitJava include the following project shapes.

Spring servicesMaven monoreposGradle buildsJPMS applications

Make the first boundary executable.

Add one meaningful rule, run it with the existing tests, and grow the architecture suite as the system reveals where it needs protection.

Start with ArchUnitJava ↗