build-and-dependencies

Configure Maven and Gradle builds and govern dependencies for Spring Boot projects.

39|3|Updated Jul 28, 2025
One-click install
npx skills add https://github.com/mzivkovicdev/spring-crud-generator --skill build-and-dependencies-mzivkovicdev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: build-and-dependencies
Source: https://github.com/mzivkovicdev/spring-crud-generator/tree/main/.agents/skills/build-and-dependencies
Command: npx skills add https://github.com/mzivkovicdev/spring-crud-generator --skill build-and-dependencies-mzivkovicdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve? Build files are production configuration, yet dependency and plugin decisions are often made ad hoc, leading to duplicated libraries, unpinned versions, broken annotation processing, and silent Spring Boot 4 wiring failures. This Skill provides disciplined rules for every build and dependency decision in Java 21+ Spring Boot projects. ## Core Features & Use Cases - Dependency governance: A five-question justification gate for every dependency, BOM-based version management, correct scoping, and a safe audit-and-removal procedure with a false-positive list covering drivers, migration tools, and auto-configuration starters. - Build configuration: Maven and Gradle references covering compiler settings, order-sensitive annotation processor paths (Lombok, MapStruct, Hibernate metamodel), test-phase separation with Surefire/Failsafe or JVM test suites, and quality gates via Checkstyle and Spotless with committed config assets. - Spring Boot 3 vs 4 catalogue: A generation-differences reference mapping renamed starters, relocated annotations, and renamed configuration properties, plus explicit verification steps for silent Spring Boot 4 modularization defects. - Use Case: When adding a new library to a Spring Boot 4 project, the Skill checks the justification gate, selects the correct generation-specific starter coordinate, declares it without a version if BOM-managed, and verifies wiring by observing runtime behavior. ## Quick Start Ask the AI to audit the project's pom.xml or build.gradle for unnecessary dependencies and unpinned plugin versions using the build-and-dependencies skill.

Frequently Asked Questions about build-and-dependencies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a dependency to a Spring Boot project correctly?▼

Pass the five-question justification gate first: name the concrete requirement, confirm the JDK or Spring Boot cannot already do it, check cost, maintenance, and license, and verify BOM management. Declare BOM-managed artifacts without a version and pin everything else explicitly.

How do I configure Lombok and MapStruct annotation processors in Maven?▼

Declare annotationProcessorPaths in order: Lombok, then lombok-mapstruct-binding, then the MapStruct processor. Without the binding, MapStruct runs before Lombok generates accessors and silently produces mappers that skip fields.

What changed in Spring Boot 4 starter coordinates?▼

Spring Boot 4 renamed many starters, for example spring-boot-starter-web became spring-boot-starter-webmvc and Flyway now requires spring-boot-starter-flyway. Old names still resolve as deprecated aliases, so builds stay green while wiring nothing.

Why does my Spring Boot 4 feature not work despite a green build?▼

Auto-configuration is modularized in Spring Boot 4, so a third-party library without its Spring Boot module is inert: the app starts and tests pass but the feature never runs. Verify wiring by observing behavior, not dependency resolution.

How do I safely remove unused dependencies from a Maven project?▼

Gather evidence with dependency:tree and source searches, then check the false-positive list covering JDBC drivers, Flyway, logging backends, and annotation processors. Remove one dependency at a time and verify with a full build including integration tests and application startup.

Should I choose Maven or Gradle for a new Spring Boot project?▼

Both are fully supported and neither is a default; the choice is an explicit project decision recorded in the project profile. If the repository already contains a build file, that is the answer, and converting between tools is never a side effect of another task.