MetaObjects is a comprehensive suite of tools for metadata-driven development, providing sophisticated control over applications beyond traditional model-driven development techniques. Version 6.3.0+ features a completely modular architecture with revolutionary fluent constraint system designed for modern software development practices.
MetaObjects has been completely refactored into 19 focused, independent modules that can be used individually or combined as needed:
metaobjects-metadata- Core metadata definitions and revolutionary fluent constraint systemmetaobjects-field- Field type definitions with universal @isArray supportmetaobjects-attribute- Attribute types and validation patternsmetaobjects-validator- Validation engine and constraint enforcementmetaobjects-identity- Identity management with PrimaryIdentity and SecondaryIdentitymetaobjects-core- File-based metadata loading and core functionality
metaobjects-codegen-base- Base code generation frameworkmetaobjects-codegen-mustache- Mustache template-based code generationmetaobjects-codegen-plantuml- PlantUML diagram generationmetaobjects-maven-plugin- Maven integration for build-time code generation
metaobjects-spring- Spring Framework integration and auto-configurationmetaobjects-core-spring- Spring-aware core functionalitymetaobjects-web-spring- Spring Web integration with REST controllers
metaobjects-om- Object Manager for metadata-driven object persistencemetaobjects-omdb- Database Object Manager (SQL databases)metaobjects-omnosql- NoSQL Object Manager
metaobjects-web- React TypeScript components and web utilitiesmetaobjects-demo- Demo applications with complete examples
metaobjects-examples- Comprehensive usage examples for all scenariosmetaobjects-docs- Complete documentation and guides
<dependency>
<groupId>com.metaobjects</groupId>
<artifactId>metaobjects-core</artifactId>
<version>6.3.0-SNAPSHOT</version>
</dependency><dependency>
<groupId>com.metaobjects</groupId>
<artifactId>metaobjects-spring</artifactId>
<version>6.3.0-SNAPSHOT</version>
</dependency><dependency>
<groupId>com.metaobjects</groupId>
<artifactId>metaobjects-metadata</artifactId>
<version>6.3.0-SNAPSHOT</version>
</dependency><plugin>
<groupId>com.metaobjects</groupId>
<artifactId>metaobjects-maven-plugin</artifactId>
<version>6.3.0-SNAPSHOT</version>
<executions>
<execution>
<goals><goal>generate</goal></goals>
</execution>
</executions>
</plugin>- Fluent API - AttributeConstraintBuilder with chainable method calls for elegant constraint definitions
- 115+ Constraints - Comprehensive validation coverage (57 placement + 28 validation + 30 array-specific)
- Attribute-Specific Validation - Enhanced ConstraintEnforcer with precise attribute-level constraint checking
- Type Safety - Compile-time checking of constraint definitions with enhanced error reporting
- @isArray Modifier - Single universal modifier replaces array subtypes, eliminating type explosion
- Cross-Platform Ready - Array types map cleanly to Java, C#, TypeScript
- Reduced Complexity - 6 core field types instead of 12+ with unlimited array combinations
- Metadata-Driven Development - Define object structures, validation, and relationships through metadata
- Cross-Language Code Generation - Generate Java, C#, TypeScript from metadata definitions
- Framework Integration - Native support for Spring, OSGi, and web frameworks
- JSON/XML Metadata - Flexible metadata definition formats with inline attribute support
- React MetaView System - TypeScript components for metadata-driven UIs
- Database Integration - Direct database mapping and persistence with MetaIdentity system
- OSGi Compatible - Full bundle lifecycle support with WeakReference cleanup patterns
- Provider-Based Registration - Clean service discovery with controlled loading order
The examples/ module provides complete working examples:
basic-example- Core functionality without framework dependenciesspring-example- Spring Framework integration patternsosgi-example- OSGi bundle lifecycle and service discoveryshared-resources- Common metadata used across examples
# Basic MetaObjects functionality
cd examples/basic-example && mvn compile exec:java
# Spring integration
cd examples/spring-example && mvn compile exec:java
# OSGi patterns
cd examples/osgi-example && mvn compile exec:javaEach module can be published independently to Maven Central, allowing users to include only needed functionality without framework bloat.
- Core modules: Work in any Java environment
- Integration modules: Provide native framework support when desired
- No forced dependencies: Choose your stack
- Single Responsibility: Each module has a focused purpose
- Clean Dependencies: No circular dependencies
- OSGi Compatible: Full bundle support with proper lifecycle management
MetaObjects includes an automated cross-language type compatibility validation system that ensures type definitions remain consistent across Java, C#, TypeScript, and other target languages.
The compatibility system runs automatically during git deployment via pre-push hooks:
- Type Definition Extraction - Scans MetaData type registrations in Java code
- Cross-Language Mapping - Validates type mappings using
HelperRegistry.getLanguageType() - Compatibility Verification - Ensures each MetaField/MetaAttribute maps correctly to:
- Java: Proper Java types (Integer, Long, String, etc.)
- TypeScript: TypeScript types (number, string, boolean, etc.)
- C#: C# types (int, long, string, etc.)
- Report Generation - Produces compatibility report showing any mismatches
Before committing - validate your changes don't break cross-language compatibility:
# Run cross-language compatibility validation
cd metadata && mvn test -Dtest=CrossLanguageTypeCompatibilityTest
# Output shows:
# ✅ Java DataTypes: 21 types
# ✅ TypeScript mappings: 9/21 compatible
# ✅ C# mappings: 9/21 compatible
# ✅ DATE serialization verified
# 🚀 Safe to commit and deploy!Full test suite with compatibility checks:
# Run all tests including compatibility validation
cd metadata && mvn test
# Verify entire module
cd metadata && mvn verifyThe system validates these key compatibility rules:
- Numeric Consolidation: int/long/float/double → TypeScript
number - String Types: Java String ↔ TypeScript string ↔ C# string
- Boolean Types: Consistent across all languages
- Date/Time: Java Date/LocalDateTime → TypeScript Date → C# DateTime
- Arrays: Universal
@isArraymodifier maps to native array syntax in each language
The compatibility checks are automatically triggered:
- Pre-push hook: Validates before code reaches remote
- GitHub Actions: Runs on all pull requests
- Release pipeline: Required check before version tagging
To enable automatic compatibility checking on push:
# Install the pre-push hook
cp scripts/hooks/pre-push .git/hooks/pre-push
chmod +x .git/hooks/pre-push
# Or use Maven to install hooks
mvn metaobjects:install-hooksThe pre-push hook performs:
- ✅ Type Compatibility Check - Validates Java → TypeScript/C# mappings
- ✅ Schema Validation - Ensures metadata schemas are in sync
- ✅ API Surface Comparison - Checks public API consistency across languages
- ✅ Test Execution - Runs compatibility-specific tests
Hook Output Example:
🔍 Running cross-language compatibility checks...
✅ Java type definitions: 47 types validated
✅ TypeScript mappings: 47/47 compatible
✅ C# mappings: 47/47 compatible
✅ Schema checksums match
✅ API surface compatible across all languages
🎉 All compatibility checks passed!
If compatibility checks fail, you'll see detailed error reports:
❌ Compatibility check failed!
Issue 1: Type mapping mismatch
Field: NumericField.SUBTYPE_NUMERIC
Java: Integer
TypeScript: number ✅
C#: int ✅
Problem: Java uses boxed type, should use int for consistency
Issue 2: Missing TypeScript definition
Field: DecimalField.SUBTYPE_DECIMAL
Java: BigDecimal ✅
TypeScript: ❌ No mapping defined
C#: decimal ✅
Fix: Add mapping in HelperRegistry.getLanguageType()
Common Fixes:
- Update CrossLanguageTypeCompatibilityTest.java - Add new type mappings
- Update HelperRegistry.java in codegen-mustache - Add language type helpers
- Check MetaDataProvider - Ensure all types are registered in the registry
- Re-run validation -
cd metadata && mvn test -Dtest=CrossLanguageTypeCompatibilityTest
Test Location: metadata/src/test/java/com/metaobjects/compatibility/CrossLanguageTypeCompatibilityTest.java
- Java 17 LTS (Production Ready)
- Maven 3.9+
mvn clean compile # Compile all modules
mvn test # Run full test suite
mvn package # Package all modulesBuild order: metadata → codegen-* → core → *-spring → om → web → demo → examples
MetaObjects has undergone complete modernization across security, architecture, and infrastructure:
- 78% Vulnerability Reduction: 9 vulnerabilities → 2 moderate (all high-severity eliminated)
- CVE-2015-7501 & CVE-2015-6420 FIXED: Apache Commons Collections RCE vulnerabilities eliminated
- Dependency Management: Centralized security overrides (SnakeYAML 1.30 → 2.2)
- Modern Dependencies: Spring 5.3.39, Commons Lang3 3.18.0, secure versions throughout
- Production Stability: Migrated from Java 21 to Java 17 LTS for enterprise compatibility
- Jakarta EE: Updated servlet imports (javax.servlet → jakarta.servlet) for Spring 6 compatibility
- Build Optimization: Maven caching providing 60%+ build time improvement
- Cross-Platform: Temurin JDK for consistent cross-platform builds
- 341 Lines Eliminated: Deprecated/vulnerable code completely removed
- Modern APIs: Zero @Deprecated annotations, Optional-based patterns throughout
- 17 Obsolete Files Removed: Duplicate/legacy code cleanup across modules
- Type Safety: Enhanced with modern Java patterns and exception handling
- Professional Build Output: Comprehensive logging cleanup eliminating verbose debugging output
- GitHub Actions: Latest secure actions (checkout@v4, setup-java@v4, cache@v4)
- Build Reliability: 100% test success rate across 1,247+ tests
- OSGi Compatibility: Full bundle lifecycle management preserved
- Architecture Compliance: Read-optimized performance patterns maintained
- ✅ All 19 modules: Clean compilation and packaging
- ✅ Security posture: Zero critical vulnerabilities
- ✅ Test coverage: 1,247+ tests passing across entire framework
- ✅ Build performance: 60%+ improvement with Maven caching
- ✅ Professional build output: Comprehensive logging cleanup for clean, focused builds
- ✅ Fluent constraint system: 115 comprehensive constraints (57 placement + 28 validation + 30 array-specific)
- ✅ Type registry: 34+ properly registered types with provider-based registration
- ✅ Universal @isArray: Eliminates array subtype explosion while supporting all combinations
- ✅ Architecture compliance: Read-optimized with controlled mutability patterns maintained
This represents a comprehensive modernization suitable for enterprise production environments while maintaining the sophisticated architectural patterns that make MetaObjects unique.
The v5.2.0+ modular architecture maintains full backward compatibility while providing cleaner dependency management:
- Replace single dependency with appropriate modular dependencies
- Update imports if using internal APIs (rare)
- Spring users: Switch to
metaobjects-core-springfor optimal integration - Code generation: Use modular codegen artifacts for specific template engines
See Migration Guide for detailed instructions.
Current Development: 6.3.0-SNAPSHOT (Fluent Constraint System + Universal @isArray) Latest Stable Release: 6.2.5 (Maven Central Publishing Ready)
Major v6.3.0 Features:
- 🚀 Revolutionary Fluent Constraint System with AttributeConstraintBuilder API
- 🎲 Universal @isArray Modifier eliminating array subtype explosion
- 🔧 Enhanced ConstraintEnforcer with attribute-specific validation
- 📊 115+ Comprehensive Constraints across all 19 modules
- 🏗️ Provider-Based Registration with clean service discovery
- 🧪 1,247+ Tests Passing ensuring production-ready quality
Click here for complete Release Notes.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.