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 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 plugin and build environment (i.e. Jenkins CI) 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
In general, tiles defined in ngss-maven-tiles apply Maven plugin configs, not core dependency, compile and test configurations. Therefore, NGSS-specific aspects like standard project file generation, container image build, and integration test execution are defined as tiles. Other common configurations are set in Mobile Framework.
Tiles Catalog
The NGSS tiles are organized into several categories including foundation tiles, testing and coverage tiles, container build tiles, code generation and documentation tiles, and DevOps and development tiles.
For detailed documentation of all available tiles, see the NGSS Maven Tiles Catalog.
Usage Examples
Modern Java Service Development
For modern Java microservices with Kubernetes development workflow:
<project>
<properties>
<ngss-maven-tiles.version>2.9.6</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 - Comprehensive test coverage with integration testing - Automated configuration file generation (Skaffold, Kustomize, etc.) - Developer portal integration with Backstage
Cloud-Native Spring Boot Development
For Spring Boot applications with modern buildpack containerization:
<project>
<properties>
<ngss-maven-tiles.version>2.9.6</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>
<!-- Cloud Native Buildpacks (latest recommended) -->
<tile>gov.va.mobile.tools.maven:buildpacks-java-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: - Multi-architecture container support (AMD64/ARM64) - No Dockerfile maintenance required - Automatic dependency layer optimization → faster image builds - JaCoCo agent integration for containerized testing - Hot reloading with Skaffold for rapid development cycles
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.