• Intro Headers Instructions Macros Commands
Fork me on GitHub
    • Introduction
    • How to install bnd
    • Guided Tour
    • Guided Tour Workspace & Projects
    • Concepts
    • Best practices
    • Build
    • Project Setup
    • Generating JARs
    • Versioning
    • Baselining
    • Service Components
    • Metatype
    • Contracts
    • Bundle Annotations
    • Accessor Properties
    • SPI Annotations
    • Resolving Dependencies
    • Launching
    • Startlevels
    • Testing
    • Testing with Launchpad
    • Packaging Applications
    • JPMS Libraries
    • Wrapping Libraries to OSGi Bundles
    • Generating Documentation
    • Commands
    • For Developers
    • Tips for Windows users
    • Tools bound to bnd
    • Reference
    • Headers
    • Instruction Reference
    • Instruction Index
    • Macro Reference
    • Macro Index
    • Plugins
    • External Plugins
    • Settings
    • Errors
    • Warnings
    • Frequently Asked Questions
  • Require-Bundle ::= bundle-description ( ',' bundle-description )*
    Header

    	verifyDirectives(Constants.REQUIRE_BUNDLE, "visibility:|resolution:", SYMBOLICNAME, "bsn");
    
    
    
    		//
    	// If there is a Require bundle, all bets are off and
    	// we cannot verify anything
    	//
    
    	if (domain.getRequireBundle().isEmpty() && domain.get("ExtensionBundle-Activator") == null
    			&& (domain.getFragmentHost()== null || domain.getFragmentHost().getKey().equals("system.bundle"))) {
    
    		if (!unresolvedReferences.isEmpty()) {
    			// Now we want to know the
    			// classes that are the culprits
    			Set<String> culprits = new HashSet<String>();
    			for (Clazz clazz : analyzer.getClassspace().values()) {
    				if (hasOverlap(unresolvedReferences, clazz.getReferred()))
    					culprits.add(clazz.getAbsolutePath());
    			}
    
    			if (analyzer instanceof Builder)
    				warning("Unresolved references to %s by class(es) %s on the " + Constants.BUNDLE_CLASSPATH + ": %s",
    						unresolvedReferences, culprits, analyzer.getBundleClasspath().keySet());
    			else
    				error("Unresolved references to %s by class(es) %s on the " + Constants.BUNDLE_CLASSPATH + ": %s",
    						unresolvedReferences, culprits, analyzer.getBundleClasspath().keySet());
    			return;
    		}
    	} else if (isPedantic())
    		warning("Use of " + Constants.REQUIRE_BUNDLE + ", ExtensionBundle-Activator, or a system bundle fragment makes it impossible to verify unresolved references");
    
    • GitHub