/micronaut-standards:dependency-managementfrom Micronaut Standards
OneLiteFeather's Gradle/Micronaut dependency-management conventions for REST API backends — the Micronaut Application and AOT plugins, reading the Micronaut version from gradle.properties instead of hardcoding it, the mn.* platform catalog, the private OneLiteFeather Maven repo, and the optional CycloneDX SBOM plugin. Use this whenever setting up or editing a Micronaut backend's build.gradle.kts/settings.gradle.kts. For the general OneLiteFeather Gradle/BOM mechanics that apply beyond Micronaut (private repo credential split, Java toolchain pattern), see minestom-knowledge:gradle/boms instead. For observability, database-migration, Testcontainers, and security dependencies specifically, see the observability, liquibase, testcontainers, and security skills — this skill only lists that those dependencies exist and where to look, not their coordinates; the one exception is structured-logging dependencies (Logstash encoder, OpenTelemetry MDC appender), whose coordinates live directly in this skill since `logging` covers only their usage.
Trending skills
7-day visitors to each skill page
Ships in Micronaut Standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A Micronaut REST API backend at OneLiteFeather is a single-module Gradle project (unless
entity-design's optional separate-model-module pattern applies) built with the Micronaut Application
plugin and its AOT companion. This skill covers the plugins, version handling, and the private-repo
catalog specific to Micronaut — general OneLiteFeather Gradle mechanics (private repo credentials, Java
toolchain) are covered by minestom-knowledge:gradle/boms and are not repeated here.
settings.gradle.kts applies the Micronaut Platform Catalog plugin, which generates the mn.* version
catalog (Micronaut's own dependency BOM, exposed as Gradle catalog entries) without needing a hand-written
libs.versions.toml:
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}
plugins {
id("io.micronaut.platform.catalog") version "5.0.2"
}
dependencyResolutionManagement {
repositories {
mavenCentral()
maven {
name = "OneLiteFeatherRepository"
url = uri("https://repo.onelitefeather.dev/onelitefeather")
if (System.getenv("CI") != null) {
credentials {
username = System.getenv("ONELITEFEATHER_MAVEN_USERNAME")
password = System.getenv("ONELITEFEATHER_MAVEN_PASSWORD")
}
} else {
credentials(PasswordCredentials::class)
authentication { create<BasicAuthentication>("basic") }
}
}
}
}
build.gradle.kts applies the two Micronaut plugins on top:
plugins {
alias(mn.plugins.micronaut.application)
alias(mn.plugins.micronaut.aot)
}
micronaut {
runtime("netty")
testRuntime("junit5")
aot {
precomputeOperations = true
cacheEnvironment = true
optimizeNetty = true
// Keep logback.xml parsed at runtime so the env-driven JSON/plain switch
// and ${...} substitutions still work in the AOT-optimized (Docker/prod) jar.
replaceLogbackXml = false
}
}
The commented replaceLogbackXml = false line is deliberate style, not filler — every non-obvious
build-file trade-off (an AOT flag, an inert dependency kept for a specific environment) gets a one-line
comment explaining why. Carry this convention into every build file this skill touches.
Never hardcode a Micronaut version anywhere in generated code or in this skill's own guidance — always
read it from the target project's gradle.properties:
micronautVersion=4.10.2
The Platform Catalog plugin and every mn.* coordinate resolve against this value. When writing or
reviewing a Micronaut project, check gradle.properties first; do not assume the version shown in any
example here (including this skill's own examples) is current — Micronaut ships frequent minor releases,
and a stale version number in documentation is worse than no version number.
The mn.* catalog also carries the annotation processors a REST backend needs — add them explicitly,
they are not implicit:
dependencies {
annotationProcessor(mn.micronaut.serde.processor)
annotationProcessor(mn.micronaut.http.validation)
annotationProcessor(mn.micronaut.data.processor)
annotationProcessor(mn.micronaut.validation.processor)
annotationProcessor(mn.micronaut.inject.java)
annotationProcessor(mn.micronaut.openapi)
compileOnly(mn.micronaut.openapi.annotations)
}
The CycloneDX Gradle plugin (org.cyclonedx.bom) generates a Software Bill of Materials for the
project's dependency tree — recommended for supply-chain transparency, but not a hard requirement for
every Micronaut backend:
plugins {
alias(libs.plugins.cyclonedx)
}
Adopt it when the project is externally deployed or when the org starts requiring SBOMs org-wide; skip it for small internal-only services if the extra build step isn't worth it yet.
The Logstash JSON encoder and the OpenTelemetry MDC appender (see logging) aren't part of the mn.*
platform catalog, so they need their own version-catalog entries:
// settings.gradle.kts version catalog
library("logstash.logback.encoder", "net.logstash.logback", "logstash-logback-encoder")
library("opentelemetry.logback.mdc", "io.opentelemetry.instrumentation", "opentelemetry-logback-mdc-1.0")
library("janino", "org.codehaus.janino", "janino")
// build.gradle.kts
dependencies {
implementation(libs.logstash.logback.encoder)
implementation(libs.opentelemetry.logback.mdc)
runtimeOnly(libs.janino) // enables <if>/<then>/<else> in logback.xml
}
logging covers when and how these get used (structured JSON output, trace/span correlation); this is
only where their Gradle coordinates come from.
observability.liquibase.testcontainers.security.This skill only establishes the Micronaut/Gradle plugin baseline and version-handling convention; it does not enumerate every dependency a backend might need.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub onelitefeathernet/onelitefeather-claude-marketplace --plugin micronaut-standards14 skills in this plugin
/configurationOneLiteFeather's convention for typed application configuration in a Micronaut REST API — one @ConfigurationProperties class per functional area in a dedicated config/ package, instead of ad-hoc properties scattered across the application entry point. Use this whenever a Micronaut backend needs a new piece of externalized configuration (a feature flag, an external service URL, a limit/threshold) and you're deciding where the corresponding Java type should live./dtoOneLiteFeather's request-DTO conventions for Micronaut REST APIs — records with @Serdeable/@Introspected, one shared Create/Update DTO controlled by JSR-380 validation groups instead of separate DTO types per action, and entity conversion methods living on the DTO itself. Use this whenever adding a new request body type to a Micronaut controller. For the response side (success/error modeling), see the response-modeling skill; for endpoint-level OpenAPI documentation, see openapi — this skill covers only the incoming request DTO and its own field-level @Schema annotations./entity-designOneLiteFeather's JPA/Micronaut Data entity conventions for Micronaut REST APIs — entities as a pure persistence layer with no Bean Validation annotations, the internal-UUID-vs-external-identifier pattern, custom AttributeConverters for complex column types, and why entities are plain Java beans rather than records or Lombok classes. Use this whenever adding or reviewing a database/entity/ class in a Micronaut backend. For where entity validation actually lives, see the dto skill; for the optional pattern of publishing entities from a separate Maven module instead of keeping them in the backend, see references/separate-model-module.md in this skill./exception-handlingOneLiteFeather's global exception-handling convention for Micronaut REST APIs — exactly one org-wide ExceptionHandlerAdvice that maps exception types to the correct HTTP status code and returns the shared ErrorResponse type from response-modeling, plus dedicated domain exception classes instead of generic RuntimeExceptions. Use this whenever adding a new failure case a Micronaut backend needs to report, or reviewing an existing global exception handler that maps everything to one status code. This is an explicit correction of a mapping-everything-to-404 pattern seen in an early reference implementation — status-code mapping by exception type is mandatory./liquibaseOneLiteFeather's mandatory Liquibase database-migration convention for Micronaut REST APIs — always XML changelogs (never YAML/SQL/JSON), the master-changelog-plus-versioned-files structure, and why this replaces Hibernate's hbm2ddl.auto=update. Use this whenever a Micronaut backend needs a schema change, or when reviewing a project still relying on hbm2ddl.auto=update for schema management. For verifying a changelog actually works against both MariaDB and PostgreSQL, see the testcontainers skill./loggingOneLiteFeather's logging conventions for Micronaut REST APIs — one SLF4J logger per class with no exceptions, structured JSON logging with OpenTelemetry trace/span correlation, log-level guidelines, and what must never be logged (PII, secrets, full request bodies). Use this whenever adding a new class that should log something, or reviewing an existing controller/service for inconsistent logging. For the Gradle dependencies and the metrics/tracing infrastructure this logging setup correlates with, see dependency-management and observability.Other plugins' skills for the same job