NGSS Maven Tiles Overview
The NextGen Shared Services (NGSS) Maven Tiles project contains a comprehensive collection of reusable Maven plugin configurations defined as Maven tiles, enabling standardized build practices across NGSS projects.
|
Deprecation and Retirement
Recommended actions for container tiles ( We recommend updating to the new "baseless" tiles introduced in version This alleviates a common complaint with maintaining the See Migrating to Baseless Image Tiles for more info. Recommended actions for all other tiles Continue to use the most recent releases of |
What are Maven Tiles?
Maven Tiles are Maven artifacts produced by the Maven Tiles Plugin that allow Maven POM fragments to be compositionally defined and reused. Each tile is simply a Maven POM XML fragment that gets programmatically included by the maven-tiles plugin at build-time, merging with the original Maven POM (including parent POMs).
This system dramatically reduces duplication among NGSS projects by defining common, recommended, and standard build configurations in reusable components. Instead of maintaining identical configurations across multiple projects or complex parent POM hierarchies, teams can selectively include only the tiles they need.
Key Benefits
-
DRY Principle: Eliminates duplication of common build configurations
-
Standardization: Ensures consistent NGSS conventions across all projects
-
Flexibility: Allows selective inclusion of specific functionality without inheriting unwanted configurations
-
Maintainability: Centralizes configuration updates in one location
-
Composability: Enables fine-grained control over build behavior through tile combinations
How NGSS Uses Maven Tiles
NGSS leverages Maven Tiles to define standard sets of Maven plugin configurations that provide an easy way to apply NGSS conventions for various Maven plugins throughout the ecosystem. The current tile ecosystem focuses on modern cloud-native development patterns:
Foundation and Configuration
-
Service Properties: Core service configuration and Docker repository settings
-
Version Management: Semantic version parsing for consistent tagging and deployment
-
Spring Integration: Seamless integration with Spring Boot application properties
Modern Container Development
-
Docker Integration: Traditional Docker Maven Plugin configurations for containerization
-
Jib Support: Google Jib plugin configurations for efficient, daemon-free container builds
-
Web Applications: nginx-based containerization for SPAs and static content
Code Quality and Testing
-
Coverage Enforcement: JaCoCo-based code coverage with configurable thresholds
-
Integration Testing: Kubernetes-native integration testing with coverage collection
-
Aggregate Reporting: Comprehensive test coverage aggregation across multiple test types
Development Workflow Automation
-
Kubernetes Development: Skaffold-based local development with hot reloading
-
File Generation: Automated generation of Skaffold, Kustomize, and deployment configurations
-
Developer Portal: Backstage integration for service catalogs and documentation
-
Database Management: Flyway migration script generation and management
Tile Categories
The NGSS tiles are organized into several categories. Click on each category for detailed documentation of all tiles in that category:
Foundation Tiles
-
base-service-tile: Foundation properties for Java services -
parse-version-tile: Version parsing and semantic version handling -
spring-properties-tile: Spring Boot properties integration
Testing and Coverage Tiles
-
jacoco-base-tile: Basic JaCoCo code coverage enforcement -
jacoco-integration-tests-tile: JaCoCo setup for integration testing (deprecated) -
jacoco-aggregate-tests-tile: Complete JaCoCo reporting with unit and integration test aggregation -
jacoco-aggregate-tile: Simplified JaCoCo aggregation
Container Build Tiles
-
docker-maven-plugin-tile: Docker build support using fabric8 plugin -
jib-maven-plugin-tile: Efficient Jib builds without Docker daemon -
web-docker-tile: Web application containers using nginx
Code Generation and Documentation Tiles
-
filegen-tile: Multi-purpose file generation (Skaffold, Kustomize, VV YAML, Backstage, etc.) -
dibr-readme-generator-tile: DIBR documentation generation -
fly_way-generator-tile: Database migration script generation -
backstage-tile: Backstage developer portal integration
DevOps and Development Tiles
-
skaffold-tile: Kubernetes development workflow with Skaffold integration -
vv-automation-tile: Vulnerability and Version automation support
Usage Examples
Modern Java Service Development
For modern Java microservices with Kubernetes development workflow:
<project>
<properties>
<ngss-maven-tiles.version>2.8.5</ngss-maven-tiles.version>
<tiles-maven-plugin.version>2.40</tiles-maven-plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<!-- Core container build with Jib -->
<tile>gov.va.mobile.tools.maven:jib-maven-plugin-tile:${ngss-maven-tiles.version}</tile>
<!-- Modern Kubernetes development workflow -->
<tile>gov.va.mobile.tools.maven:skaffold-tile:${ngss-maven-tiles.version}</tile>
<!-- Comprehensive file generation -->
<tile>gov.va.mobile.tools.maven:filegen-tile:${ngss-maven-tiles.version}</tile>
<!-- Testing and coverage -->
<tile>gov.va.mobile.tools.maven:jacoco-aggregate-tests-tile:${ngss-maven-tiles.version}</tile>
<!-- Compliance and documentation -->
<tile>gov.va.mobile.tools.maven:vv-automation-tile:${ngss-maven-tiles.version}</tile>
<tile>gov.va.mobile.tools.maven:backstage-tile:${ngss-maven-tiles.version}</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
Development Benefits: - Hot reloading with Skaffold for rapid development cycles - Efficient container builds without Docker daemon - Comprehensive test coverage with integration testing - Automated configuration generation (Skaffold, Kustomize, etc.) - Developer portal integration with Backstage
Web Application Development
For frontend applications and SPAs:
<project>
<properties>
<ngss-maven-tiles.version>2.8.5</ngss-maven-tiles.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<!-- nginx-based web container -->
<tile>gov.va.mobile.tools.maven:web-docker-tile:${ngss-maven-tiles.version}</tile>
<!-- File generation for deployment configs -->
<tile>gov.va.mobile.tools.maven:filegen-tile:${ngss-maven-tiles.version}</tile>
<!-- Developer portal integration -->
<tile>gov.va.mobile.tools.maven:backstage-tile:${ngss-maven-tiles.version}</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
Database-Centric Applications
For services with significant database management needs:
<project>
<properties>
<ngss-maven-tiles.version>2.8.5</ngss-maven-tiles.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<!-- Standard Java service setup -->
<tile>gov.va.mobile.tools.maven:jib-maven-plugin-tile:${ngss-maven-tiles.version}</tile>
<tile>gov.va.mobile.tools.maven:skaffold-tile:${ngss-maven-tiles.version}</tile>
<!-- Database migration management -->
<tile>gov.va.mobile.tools.maven:fly_way-generator-tile:${ngss-maven-tiles.version}</tile>
<!-- Documentation generation -->
<tile>gov.va.mobile.tools.maven:dibr-readme-generator-tile:${ngss-maven-tiles.version}</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
Tile Operation
Maven Tiles work by dynamically inserting each tile into the Maven project model as new parent POMs in the order specified. This creates an inheritance hierarchy where later tiles can override or extend earlier configurations, providing powerful composition capabilities while maintaining Maven’s standard inheritance model.