• 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
  • -require-bnd (FILTER ( ',' FILTER )* )?

    Prev Next
    Project
    The filter can test against 'version', which will contain the Bnd version. If it does not match, Bnd will generate an error.

    • Example: -require-bnd="(version>=4.1)"

    • Values: (FILTER ( ',' FILTER )* )?

    • Pattern: .*



    -require-bnd

    The -require-bnd instruction allows you to specify a filter that must match the Bnd version for the build to proceed. If the filter does not match, bnd will generate an error and stop the build. This is useful for enforcing minimum or specific Bnd versions in your build environment.

    Example:

    -require-bnd: version>=7.0.0
    

    If not set, any Bnd version will be accepted.

    Each specified filter must evaluate to true for the running version of Bnd in the version attribute. Since the values of the instruction are filter expressions, they need to quoted so the filter operators are not processed by Bnd.

    This instruction can be useful when the workspace requires a feature of Bnd introduced in some version of Bnd. For example:

    -require-bnd: "(version>=4.3.0)"
    

    TODO Needs review - AI Generated content

Prev Next
Search
    • Home