Skip to content

Releases: bsommerfeld/jshepherd

4.1.0

Choose a tag to compare

@bsommerfeld bsommerfeld released this 17 Jun 18:27

Build Status
Maven Central

Changelog

Added

  • Plain POJO API: @Configuration-annotated classes can be loaded without extending ConfigurablePojo via ConfigurationLoader.from(path).loadPlain(...), returning a Config<T> handle with get(), save(), reload(), getLastLoadIssues() and auto-reload control
  • @PostInject methods may now take a single List<LoadIssue> parameter to receive the load issues directly (both API styles)
  • Recursive @Section nesting: 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 an int field) keep the field default and are recorded on the POJO; inspect via getLastLoadIssues(), available inside @PostInject for custom validation (TOML and Properties)
  • YAML: java.time support (LocalDate, LocalDateTime) as ISO-8601 scalars
  • Properties format module (de.bsommerfeld.jshepherd:properties): pure-JDK .properties support 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) and stopAutoReload() on ConfigurablePojo
  • Type coercion on load: quoted numbers and booleans are converted when the target field is numeric/boolean (String fields are never touched)
  • JSON: java.time support (LocalDate, LocalDateTime, ...) serialized as ISO-8601 strings via the Jackson JSR-310 module
  • JSON: generated Markdown documentation now includes @Section fields and their nested keys
  • Unparseable config files are backed up to <filename>.bak before 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: LocalDateTime values 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 as Long); typed map values are converted as well
  • @PostInject methods 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 @Comment annotation without a value no longer emits an empty # line

Removed

4.0.4

Choose a tag to compare

@bsommerfeld bsommerfeld released this 08 Apr 00:17

Build Status
Maven Central

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.class is 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

Choose a tag to compare

@bsommerfeld bsommerfeld released this 16 Mar 16:02

Build Status
Maven Central

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

Choose a tag to compare

@bsommerfeld bsommerfeld released this 03 Mar 20:47

Build Status
Maven Central

Changelog

Added

  • add github changelog action to release workflow

Changed

Fixed

  • logs are now fine-grained

Removed

  • removed jitpack.yml

4.0.1

Choose a tag to compare

@bsommerfeld bsommerfeld released this 08 Jan 20:00

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 properties module — Focus is now on modern hierarchical formats (JSON, YAML, TOML)
  • Deprecated annotations removed@CommentSection, @TomlSection, @TomlTable are gone

✨ New Features

  • Unified @Section annotation — Single annotation for nested structures across all formats (JSON, YAML, TOML)
  • Fluent Builder API — New ConfigurationLoader.from(path).withComments().load(...) pattern
  • Improved @Section support — 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 @Section usage examples for all formats

JShepherd 3.3.2

Choose a tag to compare

@bsommerfeld bsommerfeld released this 10 Aug 01:24

JShepherd 3.3.2

🔧 Fixes

  • SnakeYML representer has been overwritten to avoid global tags

3.3.1

Choose a tag to compare

@bsommerfeld bsommerfeld released this 12 Jun 10:35

JShepherd 3.3.1

🔧 Fixes

  • File Extension for YAML: Fixed supported file extensions for the yaml module.

3.3.0

Choose a tag to compare

@bsommerfeld bsommerfeld released this 12 Jun 10:19

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 core module now only contains the necessary stuff.

3.2.0

Choose a tag to compare

@bsommerfeld bsommerfeld released this 02 Jun 18:34

JShepherd 3.2.0

🚀 New Features

  • Multi-Format Support: Automatic format detection based on file extensions (YAML, JSON, TOML, Properties)
  • JSON Documentation: Automatic .md documentation 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

Choose a tag to compare

@bsommerfeld bsommerfeld released this 02 Jun 16:05

Release 3.1.0 - Post-Injection Lifecycle Support

✨ New Features

  • @PostInject annotation - Execute custom methods after configuration field injection

🔧 Technical Details

  • Methods are called after all @Key fields are populated initially
  • Methods must take no parameters
  • Supports any method visibility (private, protected, public)