Copier Architecture
This page illustrates how the various components of the NGSS template system work together. However, it is highly recommended to become familiar with the "native" Copier workflow and its documentation, as the filegen Maven plugin is simply a wrapper around the Copier CLI, which provides more functionality the "simplified" filegen goals.
Component Descriptions
Maven Layer
- ngss-maven-tiles
-
Parent tiles that include and configure the filegen plugin with standard settings for NGSS projects.
- ngss-filegen-maven-plugin (filegen)
-
Maven plugin providing both Copier-based goals and legacy static generation goals.
Copier-Based Goals (New)
These goals use Copier for intelligent template management with 3-way merge updates.
| Goal | Template | Output |
|---|---|---|
|
ngss-devops-template |
|
|
ngss-backstage-template |
|
|
Auto-detected from |
Updates existing files with 3-way merge |
- common-copier-config
-
Shared Git submodule containing reusable question definitions and context hooks for Maven project auto-detection. Included in all Copier template repositories.
Legacy Goals (Static Generation)
These goals use static templates from ckm-deployment-templates. Files are regenerated from scratch on each run (no merge capability).
| Goal | Description | Output |
|---|---|---|
|
Jenkins CI/CD pipeline configuration |
|
|
Verification & Validation configuration |
|
|
Deployment, Installation, Backout, Rollback guide |
|
- ckm-deployment-templates
-
Repository containing Freemarker templates for legacy file generation. Templates are fetched at build time and processed with project metadata.
Data Flow
Copier-Based Flow
-
User includes
ngss-maven-tilesin theirpom.xml -
User runs
mvn filegen:copier-init -Dcopier.template=devops -
Filegen invokes Copier CLI with template URL
-
Copier prompts for configuration (with auto-detection from
pom.xml) -
Files are generated; answers stored in
.copier-answers/ -
Updates via
copier-updateapply 3-way merge preserving customizations
Migration Path
Legacy goals will continue to work, but new projects should use Copier-based goals for:
-
DevOps configs →
copier-init -Dcopier.template=devops(replaces manual K8s/Skaffold setup) -
Backstage →
copier-init -Dcopier.template=backstage(new capability)
See Filegen 6.0 Migration Guide for details.