• Intro Headers Instructions Macros Commands
Fork me on GitHub
    • Getting Started
      • Introduction
      • How to install bnd
      • Guided Tour Workspace & Projects
      • bnd / bndlib Features and JAR Wrapping Techniques
      • FAQ - Frequently Asked Questions
    • Concepts and Practices
      • Concepts
      • Background
      • Best practices
    • Build and Development
      • Build
      • Generating JARs
      • Versioning
      • Baselining
      • Service Components
      • Metatype
      • Contracts
      • Bundle Annotations
      • Accessor Properties
      • SPI Annotations
    • Dependency and Launching
      • Resolving Dependencies
      • Launching
      • Startlevels
    • Testing
      • Testing
      • Testing with Launchpad
    • Packaging and Distribution
      • Packaging Applications
      • JPMS Libraries
      • Wrapping Libraries to OSGi Bundles
    • Documentation and Tools
      • Generating Documentation
      • bnd CLI Commands
      • For Developers
      • Templates for Workspaces
      • Tips for Windows users
      • Tools bound to bnd
    • Reference Material
      • Reference
      • Headers
      • Instruction Reference
      • Instruction Index
      • Macro Reference
      • Macro Index
      • Plugins
      • External Plugins
    • Configuration and Troubleshooting
      • Settings
      • Errors
      • Warnings
  • repodigests ( ';' NAME )*

    Prev Next
    Workspace
    Get cryptographic digests of repository contents

    Summary

    The repodigests macro returns hexadecimal cryptographic digests representing the contents of all repositories or specific named repositories. This is useful for detecting changes in repository state.

    Syntax

    ${repodigests[;<repo-name>...]}
    

    Parameters

    • repo-name (optional) - One or more repository names. If omitted, returns digests for all repositories.

    Behavior

    • Calculates digest for each specified repository
    • Returns comma-separated hex-encoded digests
    • Repositories without digest support are skipped
    • Reports error if named repository not found
    • Uses repository’s getDigest() method

    Examples

    Get all repository digests:

    ${repodigests}
    # Returns: "a1b2c3d4e5f6...,f6e5d4c3b2a1..."
    

    Specific repositories:

    ${repodigests;Maven Central;Local}
    

    Check for changes:

    repo.state=${repodigests}
    

    Conditional on digest:

    ${if;${repodigests;Release};has-digest;no-digest}
    

    Use Cases

    • Detecting repository changes
    • Build cache invalidation
    • Repository state tracking
    • Dependency change detection
    • Build reproducibility

    Notes

    • Requires repository plugin support for digests
    • Returns hex-encoded digest strings
    • Comma-separated for multiple repos
    • Silently skips unsupported repositories
    • Errors on missing named repositories
    • See also: ${repos} for repository names

    TODO Needs review - AI Generated content


    See test cases in MacroTestsForDocsExamples.java

Prev Next
Search
    • Home