Releases: bsommerfeld/jshepherd
Releases · bsommerfeld/jshepherd
Release list
4.1.0
Changelog
Added
- Plain POJO API:
@Configuration-annotated classes can be loaded without extendingConfigurablePojoviaConfigurationLoader.from(path).loadPlain(...), returning aConfig<T>handle withget(),save(),reload(),getLastLoadIssues()and auto-reload control @PostInjectmethods may now take a singleList<LoadIssue>parameter to receive the load issues directly (both API styles)- Recursive
@Sectionnesting: sections can contain sections at arbitrary depth (capped at 16) in all formats — YAML indented blocks, TOML[parent.child]tables, JSON nested objects, Properties dotted keys - Load-issue reporting: values that cannot be converted (e.g.
port = "abc"for anintfield) keep the field default and are recorded on the POJO; inspect viagetLastLoadIssues(), available inside@PostInjectfor custom validation (TOML and Properties) - YAML:
java.timesupport (LocalDate,LocalDateTime) as ISO-8601 scalars - Properties format module (
de.bsommerfeld.jshepherd:properties): pure-JDK.propertiessupport with dotted keys for sections and maps, comma-separated lists, comments and UTF-8 - Auto-reload:
ConfigurationLoader.from(path).withAutoReload(Duration)watches the file on a daemon thread and reloads the POJO on external changes;setOnAutoReload(Runnable)andstopAutoReload()onConfigurablePojo - Type coercion on load: quoted numbers and booleans are converted when the target field is numeric/boolean (
Stringfields are never touched) - JSON:
java.timesupport (LocalDate,LocalDateTime, ...) serialized as ISO-8601 strings via the Jackson JSR-310 module - JSON: generated Markdown documentation now includes
@Sectionfields and their nested keys - Unparseable config files are backed up to
<filename>.bakbefore being replaced with defaults, so user edits are never silently lost
Changed
- Clearer error messages: loading a file without an extension now explains the problem, and "unsupported extension" errors list the supported extensions (or hint at missing format modules)
Fixed
- TOML:
LocalDateTimevalues with whole-minute times (zero seconds) are now written with explicit seconds, producing valid TOML that round-trips instead of failing to parse - TOML: integer lists (
List<Integer>) now load correctly (elements arrived asLong); typed map values are converted as well @PostInjectmethods declared in superclasses are now invoked (previously only the concrete class was scanned)- YAML: comment-mode output was corrupted on Windows due to platform-dependent line-separator handling
- TOML: map keys that are not valid bare keys (spaces, special characters) are now quoted instead of producing invalid TOML
- A bare
@Commentannotation without a value no longer emits an empty#line
Removed
4.0.4
Changelog
Added
- Module-path integration tests with JPMS ServiceLoader discovery validation
Changed
- Upgraded Jackson from 2.15.2 to 2.18.5 (LTS) for better JPMS compatibility
Fixed
module-info.classis now correctly injected into shaded json/yaml/toml JARs via moditect,
fixing JPMS ServiceLoader discovery on the module path (#11)- Unrelocated multi-release class entries from bundled dependencies (Jackson, SnakeYAML) are now
stripped to prevent split-package conflicts on the module path org.checkerframework(transitive dependency of tomlj) is now relocated to prevent
split-package conflicts
Removed
4.0.3
Changelog
Added
Changed
Fixed
- Enum fields with instance fields are now serialized as their constant name instead of an empty inline table across all formats (TOML, JSON, YAML) (#10)
Removed
4.0.2
4.0.1
jShepherd v4.0.1
NOTE: 4.0.1 replaces 4.0.0 entirely
🚀 Highlights
This is a major release with significant architectural improvements and a unified annotation model.
⚠️ Breaking Changes
- Removed
propertiesmodule — Focus is now on modern hierarchical formats (JSON, YAML, TOML) - Deprecated annotations removed —
@CommentSection,@TomlSection,@TomlTableare gone
✨ New Features
- Unified
@Sectionannotation — Single annotation for nested structures across all formats (JSON, YAML, TOML) - Fluent Builder API — New
ConfigurationLoader.from(path).withComments().load(...)pattern - Improved
@Sectionsupport — Full implementation in JSON (via Jackson introspector), YAML, and TOML
🔧 Improvements
- Consolidated persistence logic — Common comment-writing utilities moved to
AbstractPersistenceDelegate - Dependency shading — All dependencies relocated to
de.bsommerfeld.jshepherd.MODULE.shared.*to prevent classpath conflicts - Updated documentation — Restructured README with comprehensive examples
📦 Build & Infrastructure
- Maven Central ready — Source JARs, Javadoc JARs, GPG signing configured
- Automated releases — GitHub Actions workflow for tag-based publishing
📚 Documentation
- Self-referential generic pattern explained in
ConfigurablePojo - Complete
@Sectionusage examples for all formats
JShepherd 3.3.2
JShepherd 3.3.2
🔧 Fixes
- SnakeYML representer has been overwritten to avoid global tags
3.3.1
JShepherd 3.3.1
🔧 Fixes
- File Extension for YAML: Fixed supported file extensions for the
yamlmodule.
3.3.0
JShepherd 3.3.0
🚀 New Features
- Multi-Module: JShepherd is now modular! See the updated README for further instructions
🔧 Improvements
- Tests: The quality of JShepherd is now tested with JUnit tests.
- module-info.java: Every module now has a module-info
💡 Breaking Changes
- Multi-Module: Since JShepherd is now modular, the logic for each implementation has been moved. The
coremodule now only contains the necessary stuff.
3.2.0
JShepherd 3.2.0
🚀 New Features
- Multi-Format Support: Automatic format detection based on file extensions (YAML, JSON, TOML, Properties)
- JSON Documentation: Automatic
.mddocumentation files for JSON configurations - Enhanced @PostInject: Now executes after
reload()operations for validation support
🔧 Improvements
- Smart Format Detection: File extension determines persistence format automatically
- Better Error Handling: Clear exceptions for unsupported file extensions
📋 Supported Formats
- YAML (
.yaml,.yml) - Inline comments ✅ - JSON (
.json) - External documentation ✅ - TOML (
.toml) - Inline comments ✅ - Properties (
.properties) - Inline comments ✅
💡 Breaking Changes
- Configuration.load has been adjusted.
- Java 21: Updated to Java 21 from Java 11
3.1.0
Release 3.1.0 - Post-Injection Lifecycle Support
✨ New Features
@PostInjectannotation - Execute custom methods after configuration field injection
🔧 Technical Details
- Methods are called after all
@Keyfields are populated initially - Methods must take no parameters
- Supports any method visibility (private, protected, public)