Modules & Dependencies
The plugin is a Maven reactor of eleven modules under uk.co.taylor-made-software. Each module has a single, well-defined responsibility, and the dependencies between them are acyclic — which is what fixes the build order and keeps concerns separated (for example, the validator never depends on the builder).
Code packages use uk.co.taylormadesoftware.serverless.<module> (no hyphens), while the Maven groupId is uk.co.taylor-made-software (hyphenated).
Module Responsibilities
Module | Responsibility | Depends on (internal) |
|---|---|---|
plugin-core | Shared domain model: sealed Component hierarchy, ComponentRegistry, ComponentLink, LinkType, Result, ChangePlan, DependencyGraph. | none |
plugin-credentials | Sealed CredentialConfig hierarchy (AWS/Azure/GCP) and credential resolution. | none |
plugin-security | Derives least-privilege IAM/RBAC PermissionGrants from component links. | core |
plugin-validator | Phase 1: parse config JSON, substitute ${variables}, run the validation rule chain. | core, credentials |
plugin-state | Deployment state manifest: persistence (local + remote), locking, config hashing. | core, credentials |
plugin-planner | Phase 2: read live cloud state and diff it against desired config to build a ChangePlan. | core, credentials, state |
plugin-builder | Phase 3: deploy components in dependency order via the cloud provider strategy. | core, credentials, security, state |
plugin-verifier | Phase 4: health checks and permission verification of deployed resources. | core, credentials, security |
plugin-undeployer | Phase 5: reverse-order teardown of deployed resources. | core, credentials, security, state, builder |
plugin-docgen | Generates the baseline HTML docs, JSON Schema, and llms.txt. | core |
plugin-maven | The Maven Mojos and the phase-cascade orchestration. Packaged as a maven-plugin. | core, credentials, validator, planner, state, builder, verifier, undeployer, security |
Dependency Graph
Arrows point from a module to the modules it depends on. plugin-core and plugin-credentials are the roots (no internal dependencies); plugin-maven sits at the top and wires everything together.
Foundation Shared services Phase libraries Maven entry point
Build Order
Maven topologically sorts the reactor from the dependency graph. A valid order is:
plugin-core, plugin-credentials (foundation, no internal deps)
→ plugin-security, plugin-validator, plugin-state
→ plugin-planner, plugin-verifier
→ plugin-builder
→ plugin-undeployer
→ plugin-maven (aggregates everything)
plugin-docgen (only needs plugin-core; builds any time after core)
Because the validator and planner do not depend on the builder, configuration can be parsed, validated, and planned without any deployment code on the classpath — which is what makes serverless:validate and serverless:plan safe, side-effect-free goals.
Quality Gates
Every module enforces JaCoCo line and branch coverage (80% minimum) and PIT mutation coverage (80% minimum) at the verify phase. A small number of thin, SDK-bound classes (client factories and a couple of large deployers) are excluded from coverage; the Mojo package in plugin-maven is excluded from the coverage check because it is exercised via integration-style tests.
Next: Deploy Pipeline →