• 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 (manual|auto|beforelaunch|batch|cache)

    Prev Next
    Workspace
    Defines when/how resolving is done to calculate the -runbundles

    • Example: -resolve: '-resolve manual

    • Values: manual,auto,beforelaunch,batch,cache,never

    • Pattern: (manual|auto|beforelaunch|batch)

    Directives

    • manual Resolve is manually with the Resolve button
      • Values: manual

      • Pattern: \Qmanual\E

    • auto A resolve will take place before saving
      • Values: auto

      • Pattern: \Qauto\E

    • beforelaunch A resolve will take place before launching
      • Values: beforelaunch

      • Pattern: \Qbeforelaunch\E

    • batch A resolve will take place before launching when in batch mode (e.g. Gradle) but not in IDE mode (e.g. Eclipse)
      • Values: batch

      • Pattern: \Qbatch\E

    • cache Resolve when the runbundles are needed unless there is a cache file that is newer than the bndrun/project & workspace. The cache file has the same name as the project/bndrun file but starts with a ‘.’
      • Values: cache

      • Pattern: \Qcache\E

    • never A Resolve will never take place. Manually resolve will result in error.
      • Values: never

      • Pattern: \Qnever\E



    The bnd workspace can use a resolver to calculate the content of the -runbundles instruction based on a set of initial requirements. The bndtools GUI can manually resolve the initial requirements but through the -resolve instruction it is possible to calculate the -runbundles when the file is saved or just before the -runbundles are used in the launch.

    The values are:

    • manual – It is up to the user to resolve the initial requirements
    • auto – Whenever the initial requirements are saved, the resolver will be used to set new -runbundles
    • beforelaunch – Calculate the -runbundles on demand. This ignores the value of the -runbundles and runs the resolver. The results of the resolver are cached. This cache works by creating a checksum over all the properties of the project.
    • batch – When running in batch mode, the run bundles will be resolved. In all other modes this will only resolve when the -runbundles are empty.
    • cache – Will use a cache file in the workspace cache. If that file is stale relative to the workspace or project or it does not exist, then the bnd(run) file will be resolved and the result is stored in the cache file.
    • never – If anybody tries to resolve , the process will throw an UnsupportedOperationException. This is intended for manually curated runbundles or where a base file is resolved and other files include them an add some additional instructions. The Excepetion is meant as a clear warning to any developer accidentally resolving the -runbundles.

    Example

    -resolve beforelaunch
    
Prev Next
Search
    • Home