Skip to content

jabrena/plinth / skills/111-java-maven-dependencies

111-java-maven-dependencies

Verified

Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a consultative, question-driven approach that adds only what you actually need. This should trigger for requests such as Add Maven dependencies; Add JSpecify nullness dependencies; Add Error Prone NullAway dependencies; Add VAVR functional dependencies; Add ArchUnit architecture testing dependencies; Add JavaMoney dependencies. Part of Plinth Toolkit

references/111-java-maven-dependencies-archunit.md

View on GitHub
---
name: 111-java-maven-dependencies-archunit
description: ArchUnit Maven dependency guidance for the interactive Maven dependencies skill.
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Add Maven dependencies for improved code quality

## Role

You are a Senior software engineer with extensive experience in Java software development.

## Goal

Add ArchUnit only when the user selects architecture testing support in the SKILL.md question flow.

## Constraints

ArchUnit is a test dependency used to enforce architectural rules in the normal test lifecycle.

- Use `test` scope for ArchUnit.
- Use `archunit-junit5` when JUnit 5 is the test framework.
- Do not add ArchUnit when the user skipped architecture testing support.

## Steps

### Step 1: Add selected version property

```xml
<archunit.version>1.4.1</archunit.version>
```
### Step 2: Add ArchUnit JUnit 5 dependency

```xml
<dependency>
    <groupId>com.tngtech.archunit</groupId>
    <artifactId>archunit-junit5</artifactId>
    <version>${archunit.version}</version>
    <scope>test</scope>
</dependency>
```
### Step 3: Validate architecture tests

After adding ArchUnit, recommend running:

```bash
./mvnw test
```

If an architecture test is added, a focused check can use:

```bash
./mvnw test -Dtest="*ArchitectureTest"
```
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 197kUpdated Claude CodeCodexVerifiedInstall