• Intro Headers Instructions Macros
  • Fork me on GitHub
    • Release
    • Introduction
    • How to install bnd
    • Guided Tour
    • Guided Tour Workspace & Projects
    • Concepts
    • Best practices
    • Build
    • Generating JARs
    • Versioning
    • Baselining
    • Service Components
    • Metatype
    • Contracts
    • Manifest Annotations
    • Resolving Dependencies
    • Launching
    • Testing
    • Packaging Applications
    • Wrapping Libraries to OSGi Bundles
    • From the command line
    • For Developers
    • Plugins
    • Tools bound to bnd
    • File Format
    • Header Reference
    • Instruction
    • Instruction Index
    • Macro Reference
    • Command Reference
    • Plugins Reference
    • Settings
    • Errors
    • Warnings
    • Frequently Asked Questions
    Supported by OSGi enRoute
  • -runrepos REPO-NAME ( ',' REPO-NAME )*

    private void loadRepositories() throws IOException {
    	// Get all of the repositories from the plugin registry
    	List<Repository> allRepos = registry.getPlugins(Repository.class);
    
    	// Workspace ws = registry.getPlugin(Workspace.class);
    	// if (ws != null) {
    	// for (InfoRepository ir : registry.getPlugins(InfoRepository.class)) {
    	// allRepos.add(new InfoRepositoryWrapper(ir, ws.getCache("ir-" +
    	// ir.getName())));
    	// }
    	// }
    
    
    	// Reorder/filter if specified by the run model
    
    	String rn = properties.mergeProperties(Constants.RUNREPOS);
    	if (rn == null) {
    		// No filter, use all
    		for (Repository repo : allRepos) {
    			super.addRepository(repo);
    		}
    	} else {
    		Parameters repoNames = new Parameters(rn);
    
    		// Map the repository names...
    		Map<String,Repository> repoNameMap = new HashMap<String,Repository>(allRepos.size());
    		for (Repository repo : allRepos)
    			repoNameMap.put(repo.toString(), repo);
    
    		// Create the result list
    		for (String repoName : repoNames.keySet()) {
    			Repository repo = repoNameMap.get(repoName);
    			if (repo != null)
    				super.addRepository(repo);
    		}
    	}
    }
    
    • Contact
    • Developers
    • More