Embabel Build is a comprehensive multi-module Maven project that provides a standardized build infrastructure for all Embabel projects. This parent POM centrally manages plugins and dependencies, ensuring consistency, quality, and compliance across the enleadtire Embabel ecosystem while reducing redundant configuration and technical debt.
The project is organized into the following modules:
- embabel-build-parent: The root parent POM providing global configuration
- embabel-build-dependencies: Central BOM (Bill of Materials) for dependency versioning
- embabel-dependencies-parent: Parent module for consistent configuration inheritance
The Embabel Build system provides a robust and consistent build infrastructure across all Embabel projects through a parent POM that manages plugins and dependencies centrally:
- Single Source of Truth: Eliminates redundant configuration and ensures version consistency
- Plugin Management: Pre-configures build plugins with best practices
- Profile Management: Defines common profiles like
skip-tests
for development efficiency - Repository Configuration: Centralizes repository definitions for Spring milestones and snapshots
- Distribution Management: Configures GitHub package repository for artifact distribution
The build system is optimized for Kotlin development (version 2.1.10) with specific compiler settings and Spring integration, while maintaining Java 21 compatibility:
-
Advanced Kotlin Configuration:
- Strict JSR-305 null safety with
-Xjsr305=strict
- API version set to Kotlin 2.1
- Automatic Spring integration via the Kotlin Spring compiler plugin
- Java parameters reflection support (javaParameters=true)
- Source directory configuration for generated code handling
- Strict JSR-305 null safety with
-
Kotlin-Java Interoperability:
- Careful configuration of Maven compiler plugin executions
- Coordinated compile phases between Java and Kotlin sources
The build system seamlessly integrates with Spring Framework:
- Spring Boot Compatibility: Configured for Spring Boot 3.4.3
- Spring Plugin Integration: Kotlin compiler configured with Spring plugin for automatic component detection
- Annotation Processing: Configuration for handling Spring's annotation processing
- Resource Handling: Customized resource filtering and processing for Spring applications
The build system supports multi-module structure:
- Shared Kernel: The parent POM acts as a shared kernel for build functionality
- Module Composition: Facilitates composition of modules into higher-level aggregates
- Dependency Isolation: Helps maintain proper module boundaries and dependencies
-
Code Coverage:
- JaCoCo for detailed code coverage reporting
- XML and HTML report generation
- Integration with SonarCloud
-
Code Style:
- Spotless for Kotlin code style enforcement
- Custom formatting rules
- Automatic formatting during build
-
Testing:
- Surefire for test management
- Flaky test detection (failOnFlakeCount=1)
- Automatic rerun of failing tests (rerunFailingTestsCount=1)
- Exclusion of integration tests from unit test phase
-
Static Analysis:
- SonarCloud integration
- Language-specific analyzer configuration
- Quality gate enforcement
Centralizes dependency version control through a sophisticated BOM approach:
- Version Coordination: Makes version management consistent across all modules
- Conflict Resolution: Reduces dependency conflicts through enforcer plugin
- Transitive Dependency Management: Controls the propagation of dependencies
- Scope Management: Defines appropriate scopes for dependencies
- Exclusion Management: Handles problematic transitive dependencies
Automates license tracking and documentation generation to ensure proper legal compliance:
-
License Reports:
- Generates third-party license reports
- Creates aggregate license lists
- Manages license files for distribution
-
Dependency Documentation:
- Creates detailed dependency trees
- Documents transitive dependencies
- Sorts dependencies by group and artifact for readability
-
License Validation:
- Ensures all dependencies have compatible licenses
- Documents license exceptions where needed
Embabel Build supports robust integration with CI/CD pipelines:
-
SonarCloud:
- Configured for code quality metrics
- Organization-specific settings
- Coverage report integration
-
GitHub Integration:
- Package repository distribution
- SCM connection configuration
- Developer information
-
Git Metadata:
- Captures git commit IDs
- Tracks branch information
- Records commit timestamps
- Embeds git properties in built artifacts
Ensures reliable, reproducible builds through explicit configuration:
-
Encoding Configuration:
- UTF-8 for source encoding
- UTF-8 for output encoding
- UTF-8 for reporting
-
Compiler Settings:
- Java 21 source and target compatibility
- Explicit JVM target for Kotlin
- Standardized compiler arguments
-
POM Flattening:
- OSS-compliant POM generation
- Removal of build-specific elements
- Consistent POM structure for distribution
Automates the generation of comprehensive documentation:
-
Dependency Documentation:
- Dependency trees
- Third-party license lists
- Version information
-
Build Metadata:
- Git commit information
- Build timestamps
- Version details
-
Distribution Information:
- Organization metadata
- Developer contact information
- SCM repository links
To use Embabel Build as a parent for your project:
<parent>
<groupId>com.embabel.build</groupId>
<artifactId>embabel-build-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
To use only the dependency management without inheriting other configurations:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.embabel.build</groupId>
<artifactId>embabel-build-dependencies</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
- skip-tests: Skips all tests during build (
mvn clean install -Pskip-tests
)
Embabel Build preconfigures numerous plugins to ensure consistent builds. Key plugins include:
- kotlin-maven-plugin: Configured for Spring integration and strict null safety
- maven-compiler-plugin: Set up for Java 21 compatibility
- jacoco-maven-plugin: Configured for code coverage reporting
- spotless-maven-plugin: Set up for Kotlin code style enforcement
- git-commit-id-plugin: Configured to capture Git metadata
- license-maven-plugin: Set up for license compliance reporting
- maven-dependency-plugin: Configured for dependency analysis
- flatten-maven-plugin: Set up for POM flattening and OSS compliance
- Java 21 or higher
- Maven 3.8+
- Git (for git-commit-id-plugin functionality)
Apache License, Version 2.0
See CONTRIBUTING.md for details on how to contribute to this project.
The project is maintained by the Embabel development team:
- Rod Johnson (Founder and Project Lead)
- Alex Hein-Heifetz (Lead)
- Igor Dayen (Lead)