• Intro Headers Instructions Macros Commands
Fork me on GitHub
    • Getting Started
      • How to install bnd
      • Guided Tour
      • Guided Tour Workspace & Projects
      • FAQ - Frequently Asked Questions
    • Concepts and Practices
      • Introduction
      • Concepts
      • Best practices
    • Build and Development
      • Project Setup
      • 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
      • 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
  • -wablib FILE ( ',' FILE )*
    Builder

    Specify the libraries that must be included in a Web Archive Bundle (WAB) or WAR.

    /**
     * Turn this normal bundle in a web and add any resources.
     *
     * @throws Exception
     */
    private Jar doWab(Jar dot) throws Exception {
    	String wab = getProperty(WAB);
    	String wablib = getProperty(WABLIB);
    	if (wab == null && wablib == null)
    		return dot;
    
    	trace("wab %s %s", wab, wablib);
    	setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
    
    	Set<String> paths = new HashSet<String>(dot.getResources().keySet());
    
    	for (String path : paths) {
    		if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
    			trace("wab: moving: %s", path);
    			dot.rename(path, "WEB-INF/classes/" + path);
    		}
    	}
    
    	Parameters clauses = parseHeader(getProperty(WABLIB));
    	for (String key : clauses.keySet()) {
    		File f = getFile(key);
    		addWabLib(dot, f);
    	}
    	doIncludeResource(dot, wab);
    	return dot;
    }
    
Search
    • Home