Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Kickstart your Migrations – Grundlagen des Migr...

Kickstart your Migrations – Grundlagen des Migration-Engineering mit OpenRewrite

Slidedeck from the 20th November 2025 JUG Darmstadt meeting.

Avatar for Merlin Bögershausen

Merlin Bögershausen

November 20, 2025
Tweet

More Decks by Merlin Bögershausen

Other Decks in Programming

Transcript

  1. ©2025 Moderne, Inc. Has any of you ever carried out

    a framework migration in a production environment? POLL 1
  2. ©2025 Moderne, Inc. Result: Centrally-led, automated migrations made possible within

    the Netflix “Freedom and Responsibility” culture. “Do it for me, and I’m happy to accept the change.” — Netflix engineer “[Challenge accepted!]” — Jonathan Schneider, OpenRewrite creator & Moderne co-founder 5
  3. ©2025 Moderne, Inc. 7 OpenRewrite scaled with Moderne Single-repository mode

    Multi-repository mode OpenRewrite OSS Project Serialize LSTs to disk to scale across repos OpenRewrite Gradle Plugin OpenRewrite Maven Plugin GitHub Copilot upgrade assistant for Java Amazon Q Developer JetBrains IntelliJ IDEA Broadcom App Advisor Moderne Platform Moderne CLI / IDE plugin Single- tenant SaaS Moderne proprietary IP Moderne DX Air-gapped service Shared OSS recipe ecosystem plus Moderne proprietary recipes for major migrations and security Codemods, linters, & other refactoring tech
  4. ©2025 Moderne, Inc. 7 What real, automated code remediation looks

    like No longer define an expected exception on the ‘@Test’ annotation Auto-refactoring relocates the original contents into a lambda argument in an ‘assertThrows’ call and formats per existing code style EXAMPLE: JUnit 4 to 5 migration: “assertThrows” call added to the test’s method body Accurate code changes that match the local code style across 1,000s of repositories. 9
  5. ©2025 Moderne, Inc. 10 Key concepts defined Lossless Semantic Tree

    (LST) Visitor Pattern Recipes A structured, language- specific representation of code that preserves both syntax and semantics without losing original formatting or comments — enabling precise analysis and transformation at scale. A deterministic program that defines what to find and how to change it in code, using language-aware search and transformation logic to automate research, upgrades, remediations, and refactorings. A traversal strategy used by recipes to systematically visit nodes in the lossless semantic tree, enabling targeted analysis and modification based on node type and context.
  6. ©2025 Moderne, Inc. 11 How does the LST compare to

    other code representations? Characterized by serialization, type attribution, format preservation, and other metadata + another 600,000 nodes that didn’t fit in this graphic Text-based search Abstract Syntax Tree (AST) Lossless Semantic Tree (LST)
  7. 1 1 Declarative recipes Yaml Configurable Building blocks Composition Simple

    Refaster style recipes Annotated methods Compiler checked Limited applicability Straightforward replacements Starting point Imperative recipes Java visitors Full flexibility Increased complexity JavaTemplate builder Trait API Three types of recipes
  8. ©2025 Moderne, Inc. 13 Over 5,000 recipes in catalog Apache

    License Version 2.0 Moderne Proprietary License Moderne Source Available License Fully open source, covering core framework, plugins, and community recipes. Available for use and customization by users and companies with their own code. Fully available to Moderne customers. Example recipes: • Find annotations • Dependency report • Format Java code Example recipes: • Migrate to Spring Boot 3.3 • Migrate Log4j to SLF4J • AssertJ best practices Example recipes: • Migrate to Spring Boot 3.5 • Post quantum cryptography • Fix vulnerable dependencies
  9. ©2025 Moderne, Inc. 14 Three ways to run recipes Maven

    and Gradle Build Plugins Moderne SaaS Moderne CLI Use build plugins to run a recipe against a single repository. LSTs are stored in memory. Use the Moderne CLI to run a recipe against multiple public repositories. LSTs are serialized to disk. Requires a license to run on private repositories. Browse a marketplace of over 5,000 recipes and run any of them against a selection of over 38,000 open source repositories. mvn rewrite:run gradle rewriteRun mod run . --recipe=<recipe> https://app.moderne.io
  10. ©2025 Moderne, Inc. 16 Moderne OpenRewrite Training Hub Every 4

    weeks US and EU friendly time slots Moderne experts provide 4 hours introduction and subsequent advanced training course on OpenRewrite Register for the next slot on https://www.moderne.ai/moderne- openrewrite-training-hub