• 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
  • -resolve.preferences qname ( ',' qname )

    Prev Next
    Workspace
    Override the default order and selection of repositories

    • Example: -resolve.preferences=com.example.bundle.most.priority

    • Values: ${packages}

    • Pattern: .*



    The resolver normally finds a lost of capabilities that match a given requirement. This list has an order defined by the context. However, in certain occasions this order is not the desired order. The -resolve.preferences allows you to override this context order. It is an ordered list of Bundle Symbolic Names. The list of capabilities will always be adjusted to have the bundles in the -resolver.preferences always first when they are present.

    For example:

    `-resolve.preferences` : \
    	com.example.bundle.most.priority, \
    	com.example.bundle.less.priority, \
    	com.example.whatever
    

    Given that for a requirement the capabilties come from:

    com.example.some.bundle, 
    om.example.bundle.less.priority, 
    com.example.another.bundle, 
    com.example.most.priority
    

    Then the resulting order will be:

    com.example.most.priority
    om.example.bundle.less.priority, 
    com.example.some.bundle, 
    com.example.another.bundle, 
    

    Preferences should only be used when blacklisting is not a better solution.

Prev Next
Search
    • Home