• 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
  • vmin (';' LIST )*

    Prev Next
    Macro
    Find the minimum version in one or more lists

    Summary

    The vmin macro compares version strings using OSGi semantic versioning rules and returns the minimum (lowest) version.

    Syntax

    ${vmin;<list>[;<list>...]}
    

    Parameters

    • list - One or more semicolon-separated lists of version strings

    Behavior

    • Parses all values as OSGi versions
    • Compares using semantic versioning rules
    • Returns the lowest version string
    • Handles major.minor.micro.qualifier format

    Examples

    Find minimum version:

    ${vmin;1.2.3,2.0.0,1.0.5}
    # Returns: "1.0.5"
    

    Multiple lists:

    ${vmin;1.5.0,2.0.0;1.2.3,3.0.0}
    # Returns: "1.2.3"
    

    Check compatibility:

    min.required=${vmin;${bundle.versions}}
    

    Use Cases

    • Finding oldest compatible version
    • Version range calculations
    • Dependency analysis
    • Compatibility checking
    • Version comparison

    Notes

    • Uses OSGi semantic versioning
    • Qualifiers compared lexicographically
    • Invalid versions may cause errors
    • See also: ${vmax} for maximum version
    • See also: ${vcompare} for comparison

    See test cases in MacroTestsForDocsExamples.java

Prev Next
Search
    • Home