• 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
  • -privatepackage PACKAGE-SPEC

    Prev Next
    Builder
    Specify the private packages, these packages are included from the class path. Alternative to Private-Package, this version is not included in the manifest.

    • Example: -privatepackage: com.example.*, foo.bar

    • Values: ${packages}

    • Pattern: .*



    -privatepackage

    The -privatepackage instruction specifies packages to include from the class path as private packages. Unlike the Private-Package header, this instruction is not included in the manifest. It is used to control which packages are bundled privately in the output JAR.

    Example:

    -privatepackage: com.example.internal.*
    

    This instruction is useful for fine-grained control over bundle contents during the build process.


    TODO Needs review - AI Generated content

Prev Next
Search
    • Home