• 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
  • is ( ';' ANY )*

    Prev Next
    Macro
    Check if all given values are equal

    Summary

    The is macro checks if all provided arguments are equal to each other. Returns true if all values match, false otherwise.

    Syntax

    ${is;<value>;<value>[;<value>...]}
    

    Parameters

    • value - Two or more values to compare (minimum 2 required)

    Behavior

    • Compares all arguments using string equality
    • Returns true only if all values are exactly equal
    • Requires at least 2 arguments
    • Case-sensitive comparison

    Examples

    Check equality of two values:

    ${if;${is;${version};1.0.0};version-match;version-mismatch}
    

    Compare multiple values:

    ${is;abc;abc;abc}
    # Returns: true
    

    Check property equality:

    ${if;${is;${env};production};prod-config;dev-config}
    

    Validate configuration:

    ${is;${driver};gradle;gradle}
    # Returns: true if driver is gradle
    

    Use Cases

    • Validating that values match
    • Conditional logic based on equality
    • Configuration validation
    • Multi-value consistency checks
    • String comparison in conditionals

    Notes

    • All arguments must be exactly equal (string comparison)
    • Case-sensitive
    • Empty strings are valid values
    • See also: ${equals} for two-value comparison
    • Useful with ${if} for conditional logic

    See test cases in MacroTestsForDocsExamples.java

Prev Next
Search
    • Home